The companions of Muhammad ﷺ reported that they were traveling with the Prophet ﷺ when one of them fell asleep. Some of the others went over to a rope he had with him and took it, which startled him when he woke. The Messenger of Allah ﷺ said, "It is not lawful for a Muslim to frighten another Muslim."
حدثنا أصحاب محمد ﷺ أنهم كانوا يسيرون مع النبي ﷺ، فنام رجل منهم، فانطلق بعضهم إلى حبل معه فأخذه، ففزع، فقال رسول الله ﷺ: ((لا يحل لمسلم أن يروع مسلما)).
Reported by Abu Dawud (5004), Ahmad (23064), and Bayhaqi in Al-Adab (542), all of them from the hadith of Ibn Numayr, from Amash, from Abdullah bin Yasar, from Abdul-Rahman bin Abu Layla, who said, and then he narrated it. Its chain is sahih.A similar meaning has been reported from Ibn Umar and others, though there is some discussion about it.