Whenever the Messenger of Allah ﷺ traveled, he would say, "O Allah, You are the Companion on the journey and the Guardian over the family. O Allah, I seek refuge in You from the hardship of travel, the gloom of return, and an unwelcome sight upon coming back to family and property. O Allah, fold up the earth for us and make our journey easy."
حدثنا مسدد حدثنا يحيى حدثنا محمد بن عجلان حدثني سعيد المقبري
كان رسول الله ﷺ إذا سافر قال اللهم أنت الصاحب في السفر والخليفة في الأهل اللهم إني أعوذ بك من وعثاء السفر وكآبة المنقلب وسوء المنظر في الأهل والمال اللهم اطو لنا الأرض وهون علينا السفر
Grading work, its chain of transmission is hasan. Ahmad reported it, 2/433, from Yahya Qattan through this route. Nasai also narrated it in Al-Yawm wal-Laylah, hadith 500. It has a corroborating narration in Muslim, hadith 1342, and elsewhere.