(Imām Bukhārī narrates): Musa bin Ismail narrated the hadith to us, he said: Juwairiyah bin Asma narrated the hadith to us, from Hazrat Ibn Umar (Allāh be pleased with them both), he narrated that
the Prophet ﷺ used to offer prayer upon his mount while travelling, whichever direction it faced, he ﷺ used to offer the night prayer by gesture, except the obligatory prayers, and he used to offer Witr upon his mount.
حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ قَالَ حَدَّثَنَا جُوَيْرِيَةُ بْنُ أَسْمَاءَ عَنْ نَافِع عَنْ ابْنِ عُمَرَ قَالَ كَانَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يُصَلِّي فِي السَّفَر على رَاحِلَتِهِ حَيْثُ تَوَجَّهَتْ بِهِ يُومِئُ إيمَاءً صَلَاةَ اللَّيْلِ إِلَّا الْفَرَائِضَ وَيُوتِرُ عَلَى رَاحِلَتِهِ
Reference: Sahih Al Bukhari 1000