Ibn Umar used to pray in whatever direction his mount was facing, and he said that the Messenger of Allah ﷺ used to do the same.
حدثنا محمد بن جعفر حدثنا شعبة عن خبيب بن عبد الرحمن عن حفص بن عاصم
أنه كان يصلي حيث توجهت به راحلته قال وكان رسول الله ﷺ يفعله