The Messenger of Allah ﷺ used to command us, when we were traveling, not to remove our leather socks for three days and three nights except in the case of major ritual impurity, though we could keep them on after relieving ourselves or sleeping.
كان رسول الله ﷺ يأمرنا إذا كنا سفرا أن لا ننزع خفافنا ثلاثة أيام ولياليهن إلا من جنابة، لكن من غائط وبول ونوم.
Tirmidhi (96), Nasai (126, 127), and Ibn Majah (478) narrated it from the hadith of Asim bin Abu Najud, from Zirr bin Hubaysh, from Safwan bin Assal, mentioning something similar. Tirmidhi said, "Hasan sahih." He also said, Muhammad (bin Ismail Bukhari) said, "The best thing on this subject is the hadith of Safwan bin Assal." Ibn Khuzayma (196) and Ibn Hibban (1100) also graded it sahih from this route. Its isnad is hasan because of Asim bin Abu Najud. Tirmidhi said, "This hadith has also been narrated from Safwan bin Assal through a route other than that of Asim."I say, the Hafiz said in his Talkhis (157/1), Ibn Manda Abu Qasim mentioned that more than forty people narrated it from Asim, and Asim was corroborated in this by Abdul-Wahhab bin Bakht, Ismail bin Abu Khalid, Talha bin Musarrif, Minhal bin Amr, and Muhammad bin Suqa. He also mentioned a group along with him, meaning by that the basic content of the hadith, since in its original form it is long and includes mention of repentance and of "a person being with those he loves."As for his saying "safran" (travelers), it is the plural of "safir" (traveler), just as one says "tajir" (merchant), plural "tujjar," and "rakib" (rider), plural "rukkab."As for his saying, "except for stool, urine, and sleep," Khattabi said, "The word 'lakin' (but) is used for correction, because it is preceded by a negation and an exception, namely his statement, 'He used to command us not to remove our socks for three days and their nights except in the case of janaba,' then he said, 'but for urine, stool, and sleep,' correcting it with 'lakin' so that it would be known that the concession applies only to this type of minor impurity, not to janaba. For the traveler who wipes over his socks, if he becomes in a state of janaba, must remove the socks and wash his feet along with the rest of his body. This is like saying, 'Zayd did not come to me, but Amr did,' and 'I did not see Zayd, but I saw Khalid.'" End of quote.This is as he said, for Ahmad (18093) narrated it through the route of Abdul-Razzaq, who said, "Mamar narrated to us," from Asim bin Abu Najud, with his isnad, and its wording is, "We would not remove them for stool, urine, or sleep, and we would not remove them except for janaba."For more, see Minna Kubra (179/1).Note, see this hadith in the Book of Knowledge in its fuller form, as narrated by Nasai and others.