The Prophet ﷺ used to pray the night prayers while traveling on his mount, in whatever direction it was facing, indicating the movements with gestures, except for the obligatory prayers. He would also perform the witr prayer on his mount.
حدثنا موسى بن إسماعيل قال حدثنا جويرية بن أسماء عن نافع
كان النبي ﷺ يصلي في السفر على راحلته حيث توجهت به يومئ إيماء صلاة الليل إلا الفرائض ويوتر على راحلته