Sayyiduna Safwan bin Assal (may Allah be pleased with him) narrates: When we were on a journey, the Messenger of Allah (peace and blessings be upon him) would order us not to take off our leather socks for three days except for major ritual impurity (janabah); but for defecation, urination or sleep (we should not take them off).
Hadith Referenceالمعجم الكبير للطبراني / باب الصاد / 7331