The Companions of Muhammad ﷺ reported that they were traveling with the Prophet ﷺ when one of them fell asleep. Some of them went over to a rope he had with him and took it, which startled him.The Messenger of Allah ﷺ said, "It is not lawful for a Muslim to frighten another Muslim."
حدثنا محمد بن سليمان الأنباري حدثنا ابن نمير عن الأعمش عن عبد الله بن يسار
حدثنا أصحاب محمد ﷺ أنهم كانوا يسيرون مع النبي ﷺ فنام رجل منهم فانطلق بعضهم إلى حبل معه فأخذه ففزع فقال رسول الله ﷺ لا يحل لمسلم أن يروع مسلما
[Hasan] Ahmad reported it: 362/5, from the hadith of Ibn Numayr, with a similar wording. Fitr bin Khalifa also narrated it from Ibn Yasar, with a similar wording. The hadith has corroborating narrations found in Tahawi (Tuhfat al-Akhyar bi-Sharh Mushkil Athar: 104/7, hadith no. 4995) and others.