Sunan an-Nasa'i, Volume 1, Book 9, Hadith 744 (DarusSalam)

It was narrated that Ibn Umar said: "The messenger of Allah (peace be upon him) used to pray atop his mount while travelling, facing whatever direction it was facing." (One of the narrators) Malik said: "Abdullah bin Dinar said: and Ibn Umar used to do likewise".

أَخْبَرَنَا قُتَيْبَةُ، عَنْ مَالِكِ بْنِ أَنَسٍ، عَنْ عَبْدِ اللَّهِ بْنِ دِينَارٍ، عَنِ ابْنِ عُمَرَ، قَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُصَلِّي عَلَى رَاحِلَتِهِ فِي السَّفَرِ حَيْثُمَا تَوَجَّهَتْ بِهِ ‏.‏ قَالَ مَالِكٌ قَالَ عَبْدُ اللَّهِ بْنُ دِينَارٍ وَكَانَ ابْنُ عُمَرَ يَفْعَلُ ذَلِكَ ‏.‏

sunnah.com