All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
As regards Nawafil (non-stressed supererogatory) prayers, the majority of scholars are of the view that it is desirable for a traveler to pray Nawafil prayers when traveling, without a distinction between Rawatib (stressed non-obligatory prayers) and others.
Al-Nawawi said in Al-Majmua: “The scholars of our school of thought said: “It is desirable to pray Nawafil prayers during travel, be it Rawatib after obligatory prayers or else.”
However, other people of knowledge are of the view that one should not pray Rawatib while traveling. They gave the evidence of the Hadith narrated by Ibn Omar reported by Bukhari and Muslim and where Ibn Omar said: “I kept company with the Prophet and he did not pray more than 2 Raka'as while traveling.”
Al-Nawawi said: “The evidence of the scholars of our school of thought are many Ahadith among which is the well-known Ahadith about facing Qibla while praying and other Ahadith. The Prophet used to pray Nawafil prayers on his mount towards whichever direction it led him.”
Abu Qatada reported the previous Hadith, in the chapter of supererogatory prayers, that “they were with the Prophet on a journey, so they over slept until Fajr prayer time passed and the sun rose. They continued their journey until the sun rose high in the sky, then the Prophet got down, performed ablution (Wudu), and Bilal called the Adhaan (call to the prayer). After that the Prophet prayed two Raka'as then he prayed the Fajr. He did the same as he used to do everyday,” reported by Muslim. The two Raka'as were the Sunnah of Fajr.
Um Hani' also said that the Prophet prayed on The Day he conquered Makkah, 8 Raka'as of Duha prayer. Al-Bukhari and Al-Baihaqi referred to the above Ahadith in their evidence.
Al Bara Ibn Al Aazib also said: “I kept company with the Prophet 18 times during the travel, and I never saw him leaving to pray the two Raka'as when the sun rises high in the sky before Dhuhr”, reported by Abu Dawud and Al-Thirmidhi, and Al-Bukhari classified this Hadith as a good Hadith.
Al Hajjaj Ibn Arta'a reporting from Atiya Al Uffi from Ibn Omar who said: “I prayed Dhuhr 2 Raka'as with the Prophet on a journey, and (He prayed) 2 Raka'as after Dhuhr", reported by Al Thirmidhi who said that it is a good Hadith.
As regards the first narration of Ibn Omar that the Prophet did not use to pray more than 2 Raka'as while on travel, then the narrations that confirmed that the Prophet prayed more than that are given priority, and this was probably sometimes only.
Allah knows best.