I heard Abu Burda who accompanied Yazid bin Abi Kabsha on a journey. Yazid used to observe fasting on journeys. Abu Burda said to him, "I heard Abu Musa several times saying that Allah's Apostle said, 'When a slave falls ill or travels, then he will get reward similar to that he gets for good deeds practiced at home when in good health." (Using translation from Bukhārī 2996)
قَالَ رَسُولُ اللهِ ﷺ إِذَا مَرِضَ الْعَبْدُ أَوْ سَافَرَ كُتِبَ لَهُ مِنَ الْأَجْرِ مِثْلُ مَا كَانَ يَعْمَلُ مُقِيمًا صَحِيحًا