Sunan Abi Dawud Book 4, Hadith 27
While travelling the Messenger of Allah (ﷺ) would pray voluntary prayer on his riding beast in whatever direction it turned; and he would observe witr prayer, but he did not offer the obligatory prayers upon it.
I accompanied Ibn 'Umar on the way (on a journey). He led us in two rak'ah's of (the noon) prayer. Then he proceeded and saw some people standing. He asked: What are they doing ? I replied: They are glorifying Allah (i.e. offering supererogatory prayer). He said: If I had offered the supererogatory prayer (while travelling), I would have completed prayer, my cousin. I accompanied the Messenger of Allah (ﷺ) during the journey, he did not pray more than two raka'at until his death. I also accompanied Abu Bakr, and he prayed two raka'at and nothing more until he died. I also accompanied 'Umar, and he prayed two raka'at and nothing more until he died. I also accompanied 'Uthman, and he prayed two raka'at and nothing more until he died. Indeed Allah, the Exalted, said: "Certainly you have in the Messenger of Allah an excellent exemplar"
When the Messenger of Allah (ﷺ) was on a journey and wished to say voluntary prayer, he made his she-camel face the qiblah and uttered the takbir (Allah is most great), then prayed in whatever direction his mount made his face.