(9) باب يَنْزِلُ لِلْمَكْتُوبَةِ
Narrated Salim:
At night `Abdullah bin `Umar used to offer the prayer on the back of his animal during the journey and never cared about the direction he faced. Ibn `Umar said, "Allah's Messenger (ﷺ) used to offer the optional prayer on the back of his Mount facing any direction and also used to pray the witr on it but never offered the compulsory prayer on it."
Reference: Sahih al-Bukhari 1098
In-book reference: Book 18, Hadith 18
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 2, Book 20, Hadith 202