Riyad as-SalihinChapter 17Hadith 1069
Full Sharh — Riyad as-Salihin 1069
وعن أنس رضي الله عنه أنهم انتظروا النبي صلى الله عليه وسلم ، فجاءهم قريبًا من شطر الليل فصلى بهم، يعني العشاء، قال: ثم خطبنا فقال: "ألا إن الناس قد صلوا. ثم رقدوا، وإنكم لن تزالوا في صلاة ما انتظرتم الصلاة" ((رواه البخاري)).
English Translation
Anas (May Allah be pleased with him) said:: Once the Prophet (ﷺ) delayed the 'Isha' (night) prayer till midnight. He (ﷺ) turned to us after the prayer and said, "All the people slept after offering their prayers, but you who waited, will be accounted as if you were engaged in your prayer throughout the period.".
Source
Riyad as-Salihin(رياض الصالحين)
The Book of the Prohibited actions
Hadith Number
1069