The Messenger of Allah ﷺ established the prayer of residence and the prayer of travel. We used to pray before and after it while at home, and we also used to pray before and after it while traveling.
حدثنا أبو بكر بن خلاد حدثنا وكيع حدثنا أسامة بن زيد قال سألت طاوسا عن السبحة في السفر والحسن بن مسلم بن يناق جالس عنده فقال حدثني طاوس أنه سمع
فرض رسول الله ﷺ صلاة الحضر وصلاة السفر فكنا نصلي في الحضر قبلها وبعدها وكنا نصلي في السفر قبلها وبعدها
Source. [Its chain of transmission is hasan] Ahmad narrated it (1/232) from Waki through him, and Busiri said, "This chain is hasan because Usama bin Zayd falls short of the level of the people of precise memory and retention, while the rest of the narrators in the chain are trustworthy."Usama is hasan al-hadith, as I have established in Nail Maqsud, no. 394, may Allah make its printing easy for us.