I was traveling with Ibn Umar when I fell behind to perform the witr prayer. When I caught up, he asked, "What kept you behind?"I replied, "I performed the witr."He said, "Do you not have an excellent example in the Messenger of Allah ﷺ?"I said, "Of course."He said, "The Messenger of Allah ﷺ used to perform the witr while riding his camel."
حدثنا أحمد بن سنان حدثنا عبد الرحمن بن مهدي عن مالك بن أنس عن أبي بكر بن عمر بن عبد الرحمن بن عبد الله بن عمر بن الخطاب
كنت مع ابن عمر فتخلفت فأوترت فقال ما خلفك قلت أوترت فقال أما لك في رسول الله ﷺ أسوة حسنة قلت بلى قال فإن رسول الله ﷺ كان يوتر على بعيره
Bukhari narrated it in Witr, chapter on Witr while riding, hadith no. 999, and Muslim in the Prayer of Travelers, chapter on the permissibility of performing the supererogatory prayer while riding during travel in whatever direction one is facing, hadith no. 700, from the hadith of Malik.