(23) باب الْحَالِ الَّتِي يَجُوزُ فِيهَا اسْتِقْبَالُ غَيْرِ الْقِبْلَةِ .
It was narrated from Salim that his father said:
"The Messenger of Allah (ﷺ) used to pray voluntary prayers (Usabbih) while riding his mount, facing whatever direction it was facing, and he would pray Witr likewise, but he would not offer the prescribed prayers on it."
Reference: Sunan an-Nasa'i 490
In-book reference: Book 5, Hadith 43
English translation: Vol. 1, Book 5, Hadith 491