Hadith 24

Sahih Bukhari

Book 18: Shortening the Prayers (At-Taqseer)

Chapter 12

Whoever offered Nawafil not after the compulsory Salat but before it

باب مَنْ تَطَوَّعَ فِي السَّفَرِ فِي غَيْرِ دُبُرِ الصَّلَوَاتِ وَقَبْلَهَا

The Prophet ﷺ offered two Rak'a before the Fajr prayers on a journey. ​​
وَرَكَعَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ رَكْعَتَيِ الْفَجْرِ فِي السَّفَرِ.
Sahih al-Bukhari 1104
وَقَالَ اللَّيْثُ حَدَّثَنِي يُونُسُ، عَنِ ابْنِ شِهَابٍ، قَالَ حَدَّثَنِي عَبْدُ اللَّهِ بْنُ عَامِرٍ، أَنَّ أَبَاهُ، أَخْبَرَهُ أَنَّهُ، رَأَى النَّبِيَّ صلى الله عليه وسلم صَلَّى السُّبْحَةَ بِاللَّيْلِ فِي السَّفَرِ عَلَى ظَهْرِ رَاحِلَتِهِ حَيْثُ تَوَجَّهَتْ بِهِ‏.‏
Narrated `Abdullah bin Amir that his father had told him that he had seen the Prophet (p.b.u.h) praying Nawafil at night on the back of his Mount on a journey, facing whatever direction it took.