Ibn `Umar went on a journey and said, "I accompanied the Prophet (ﷺ) and he did not offer optional prayers during the journey, and Allah says: 'Verily! In Allah's Messenger (ﷺ) you have a good example to follow.' " (33.21)
Sahih al-Bukhari Book 18, Hadith 21