Language:
كتاب مواقيت الصلاة
9  
Times of the Prayers
(40)
Chapter: Talking about the Islamic jurisprudence and good things after the 'Isha prayer
(40)
باب السَّمَرِ فِي الْفِقْهِ وَالْخَيْرِ بَعْدَ الْعِشَاءِ
Sahih al-Bukhari 600

Narrated Qurra bin Khalid:

Once he waited for Al-Hasan and he did not show up till it was about the usual time for him to start his speech; then he came and apologized saying, "Our neighbors invited us." Then he added, "Narrated Anas, 'Once we waited for the Prophet (ﷺ) till it was midnight or about midnight. He came and led the prayer, and after finishing it, he addressed us and said, 'All the people prayed and then slept and you had been in prayer as long as you were waiting for it." Al-Hasan said, "The people are regarded as performing good deeds as long as they are waiting for doing good deeds." Al-Hasan's statement is a portion of Anas's [??] Hadith from the Prophet (ﷺ) .

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ الصَّبَّاحِ، قَالَ حَدَّثَنَا أَبُو عَلِيٍّ الْحَنَفِيُّ، حَدَّثَنَا قُرَّةُ بْنُ خَالِدٍ، قَالَ انْتَظَرْنَا الْحَسَنَ وَرَاثَ عَلَيْنَا حَتَّى قَرُبْنَا مِنْ وَقْتِ قِيَامِهِ، فَجَاءَ فَقَالَ دَعَانَا جِيرَانُنَا هَؤُلاَءِ‏.‏ ثُمَّ قَالَ قَالَ أَنَسٌ نَظَرْنَا النَّبِيَّ صلى الله عليه وسلم ذَاتَ لَيْلَةٍ حَتَّى كَانَ شَطْرُ اللَّيْلِ يَبْلُغُهُ، فَجَاءَ فَصَلَّى لَنَا، ثُمَّ خَطَبَنَا فَقَالَ ‏ "‏ أَلاَ إِنَّ النَّاسَ قَدْ صَلَّوْا ثُمَّ رَقَدُوا، وَإِنَّكُمْ لَمْ تَزَالُوا فِي صَلاَةٍ مَا انْتَظَرْتُمُ الصَّلاَةَ ‏"‏‏.‏ قَالَ الْحَسَنُ وَإِنَّ الْقَوْمَ لاَ يَزَالُونَ بِخَيْرٍ مَا انْتَظَرُوا الْخَيْرَ‏.‏ قَالَ قُرَّةُ هُوَ مِنْ حَدِيثِ أَنَسٍ عَنِ النَّبِيِّ صلى الله عليه وسلم‏.‏
Reference : Sahih al-Bukhari 600
In-book reference : Book 9, Hadith 75
USC-MSA web (English) reference : Vol. 1, Book 10, Hadith 574
  (deprecated numbering scheme)