The Prophet ﷺ was unable to sleep one night and said, "If only a righteous man from my companions would guard me tonight." Just then we heard the sound of weapons.He asked, "Who is this?"Someone replied, "It is Saad, Messenger of Allah. I have come to guard you."The Prophet ﷺ then slept until we heard him snoring.
أرق النبي ﷺ ذات ليلة، فقال: ليت رجلا صالحا من أصحابي يحرسني الليلة إذ سمعنا صوت السلاح، قال: من هذا؟ قيل: سعد يا رسول الله، جئت أحرسك، فنام النبي ﷺ حتى سمعنا غطيطه.
Bukhari narrated it in the chapter on wishing (7231), and Muslim in the merits of the companions (2410:39), both through Sulayman bin Bilal, from Yahya bin Saeed, from Abdullah bin Amir bin Rabia, from Ayesha, who mentioned it.