Sahih Bukhari Volume 4, Book 52, Hadith Number 158.

Narated By Jabir bin Abdullah : That he proceeded in the company of Allah’s Apostle towards Najd to participate in a Ghazwa. (Holy-battle) When Allah’s Apostle returned, he too returned with him. Midday came upon them while they were in a valley having many thorny trees. Allah’s Apostle and the people dismounted and dispersed to rest in the shade of the trees. Allah’s Apostle rested under a tree and hung his sword on it. We all took a nap and suddenly we heard Allah’s Apostle calling us. (We woke up) to see a bedouin with him. The Prophet said, “This bedouin took out my sword while I was sleeping and when I woke up, I found the unsheathed sword in his hand and he challenged me saying, ‘Who will save you from me?’ I said thrice, ‘Allah.’ The Prophet did not punish him but sat down.