Yahya related to me from Malik from Abdullah ibn Dinar from Abdullah ibn Umar that the Messenger of Allah ﷺ used to pray on his mount while travelling, whichever way it was facing. Abdullah ibn Dinar said, "Abdullah ibn Umar would also do that."
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يُصَلِّي عَلَى رَاحِلَتِهِ فِي السَّفَرِ حَيْثُ تَوَجَّهَتْ بِهِ قَالَ عَبْدُ اللَّهِ بْنُ دِينَارٍ وَكَانَ عَبْدُ اللَّهِ بْنُ عُمَرَ يَفْعَلُ ذَلِكَ