It is narrated from Sayyiduna Sahl bin al-Hanzaliyyah (may Allah be pleased with him) that he said: We travelled with the Messenger of Allah (peace and blessings be upon him) in an army; then he mentioned the complete hadith. In it there is also that the Messenger of Allah (peace and blessings be upon him) said: "Who will guard us tonight?" Sayyiduna Unays bin Abi Marthad al-Ghanawi (may Allah be pleased with him) said: O Messenger of Allah! I will. He (peace and blessings be upon him) said: "Go to this mountain pass until you reach its top, and do not come down at all except to pray or to relieve yourself."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2221