Sahih Bukhari – Hadith No : 3611

Narrated Sharik bin `Abdullah bin Abi Namr: I heard Anas bin Malik telling us about the night when the Prophet was made to travel from the Ka`ba Mosque. Three persons (i.e. angels) came to the Prophet before he was divinely inspired was an Aspostle), while he was sleeping in Al Masjid-ul-Haram. The first (of the three angels) said, “Which of them is he?” The second said, “He is the best of them.” That was all that happened then, and he did not see them till they came at another night and he perceived their presence with his heart, for the eyes of the Prophet were closed when he was asleep, but his heart was not asleep (not unconscious). This is characteristic of all the prophets: Their eyes sleep but their hearts do not sleep. Then Gabriel took charge of the Prophet and ascended along with him to the Heaven.

Hadith In Arabic Text :

حدثنا إسماعيل، قال حدثني أخي، عن سليمان، عن شريك بن عبد الله بن أبي نمر، سمعت أنس بن مالك، يحدثنا عن ليلة، أسري بالنبي صلى الله عليه وسلم من مسجد الكعبة جاء ثلاثة نفر قبل أن يوحى إليه، وهو نائم في مسجد الحرام، فقال أولهم أيهم هو فقال أوسطهم هو خيرهم وقال آخرهم خذوا خيرهم‏.‏ فكانت تلك، فلم يرهم حتى جاءوا ليلة أخرى، فيما يرى قلبه، والنبي صلى الله عليه وسلم نائمة عيناه ولا ينام قلبه وكذلك الأنبياء تنام أعينهم ولا تنام قلوبهم، فتولاه جبريل ثم عرج به إلى السماء‏.‏

Chapter : Virtues and Merits of the Prophet (pbuh) and his Companions – كتاب المناقب