Mishkat al-Masabih 144
Jabir said:
Angels came to the Prophet when he was asleep; and they said, “A comparison can be drawn with this friend of yours, so draw one.” One of them said, “He is asleep;” but another replied, “The eye sleeps while the heart is awake.” Then they said, “He may be likened to a man who built a house, prepared a feast in it, and sent one to issue invitations. Whoever responds to the one who invites him will enter the house and eat of the feast, but whoever does not respond will not enter the house or eat of the feast.” They said, “If you interpret it to him, he will understand it whereupon one said, “He is a sleep”, and another replied, “The eye sleeps while the heart is awake.” Then they said, “The house is paradise, the one who issues the invitation is Muhammad, he who obeys Muhammad has obeyed God, and he who disobeys Muhammad has disobeyed God. Muhammad is one who separates between people.” 

Bukhari transmitted it.
عَن جَابر بن عبد الله يَقُول جَاءَتْ مَلَائِكَةٌ إِلَى النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَهُوَ نَائِم فَقَالَ بَعْضُهُمْ إِنَّهُ نَائِمٌ وَقَالَ بَعْضُهُمْ إِنَّ الْعَيْنَ نَائِمَة وَالْقلب يقظان فَقَالُوا إِنَّ لِصَاحِبِكُمْ هَذَا مَثَلًا فَاضْرِبُوا لَهُ مثلا فَقَالَ بَعْضُهُمْ إِنَّهُ نَائِمٌ وَقَالَ بَعْضُهُمْ إِنَّ الْعَيْنَ نَائِمَةٌ وَالْقَلْبَ يَقْظَانُ فَقَالُوا مَثَلُهُ كَمَثَلِ رَجُلٍ بَنَى دَارًا وَجَعَلَ فِيهَا مَأْدُبَةً وَبَعَثَ دَاعِيًا فَمَنْ أَجَابَ الدَّاعِيَ دَخَلَ الدَّارَ وَأَكَلَ مِنَ الْمَأْدُبَةِ وَمَنْ لَمْ يُجِبِ الدَّاعِيَ لَمْ يَدْخُلِ الدَّارَ وَلَمْ يَأْكُلْ مِنَ الْمَأْدُبَةِ فَقَالُوا أَوِّلُوهَا لَهُ يفقهها فَقَالَ بَعْضُهُمْ إِنَّهُ نَائِمٌ وَقَالَ بَعْضُهُمْ إِنَّ الْعَيْنَ نَائِمَة وَالْقلب يقظان فَقَالُوا فالدار الْجنَّة والداعي مُحَمَّد صلى الله عَلَيْهِ وَسلم فَمن أطَاع مُحَمَّدًا صلى الله عَلَيْهِ وَسلم فقد أطَاع الله وَمن عصى مُحَمَّدًا صلى الله عَلَيْهِ وَسلم فقد عصى الله وَمُحَمّد صلى الله عَلَيْهِ وَسلم فرق بَين النَّاس. رَوَاهُ البُخَارِيّ