Amir bin Rabia reported,

I saw the Prophet ﷺ praying on his mount in whatever direction it faced him.In another narration, I saw the Messenger of Allah ﷺ on his mount performing voluntary prayer, gesturing with his head toward whatever direction it faced. But the Messenger of Allah ﷺ would not do this in the obligatory prayer.

Azami 2892

Sahih

عن عبد الله بن عامر بن ربيعة، عن أبيه قال

رأيت النبي ﷺ يصلي على راحلته حيث توجهت به. وفي رواية: رأيت رسول الله ﷺ وهو على راحلته يسبح، يومى برأسه قبل أي وجه توجه، ولم يكن رسول الله ﷺ يصنع ذلك في الصلاة المكتوبة.

الأعظمي 2892صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Witr prayer
Section
Obligatory prayer is not performed on a mount, unlike voluntary prayer
Numbering
Jami al-Kamil 2892 (2nd edition)
Azami 2892