Abu Dharr reported,

We fasted Ramadan with the Messenger of Allah ﷺ, and he did not lead us in any night prayer until seven nights remained. Then he led us in prayer on the seventh night until about a third of the night had passed. On the sixth night he did not lead us, but on the fifth night he led us in prayer until about half the night had passed.I said, "Messenger of Allah, if only you would lead us in voluntary prayer for the rest of this night."He replied, "Whoever stands in prayer with the imam until he finishes is credited with praying the entire night."On the fourth night he did not lead us, but when the third night came, he gathered his wives and family, and the people gathered as well, and he led us in prayer until we feared we would miss the falah.It was asked, "What is the falah?"He answered, "The pre-dawn meal."Then he did not lead us in any night prayer for the remainder of the month.

Ibn Majah 1327

Sahih

حدثنا محمد بن عبد الملك بن أبي الشوارب حدثنا مسلمة بن علقمة عن داود بن أبي هند عن الوليد بن عبد الرحمن الجرشي عن جبير بن نفير الحضرمي

عن أبي ذر قال

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

ابن ماجه 1327صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
Night prayer during Ramadan
Numbering
Darussalam 1327
Ibn Majah 1327