Narrated Ibn 'Umar: 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.
The Prophet Muhammad's practice of observing witr prayer also serves as an example for us today. Witr is an optional night prayer which consists of three rak'ahs and can be prayed at any point during the night after Ishaa' until dawn breaks. It is recommended for Muslims to observe this special form of worship as it helps them stay connected with Allah even during late hours when they may be too tired or busy for other forms of worship such as reciting Quran or dhikr.