Safwan bin 'Assal said:
"When we were with the Messenger of Allah (ﷺ) on a journey, he told us not to take them off for three days except in the case of Janabah, but not in the case of defecation, urinating or sleep." (JA)
English reference (JA): Vol. 1, Book 1, Hadith 159 (JA)
Arabic reference (JA): Book 1, Hadith 160 (JA)