Anas bin Malik reported,

The Prophet ﷺ came out to them during Ramadan and led them in a brief prayer, then went back inside and prayed at length. He came out again and led them briefly, then went back inside and prayed at length.When morning came, we said, "Prophet of Allah, we sat waiting last night, and you came out to us and prayed briefly, then went inside and prayed at length?"He replied, "I did that for your sake."

Azami 2732

Hasan

عن أنس

أن النبي ﷺ خرج إليهم في رمضان فخفف بهم، ثم دخل فأطال، ثم خرج فخفف بهم، ثم دخل فأطال، فلما أصبحنا قلنا: يا نبي الله! جلسنا الليلة فخرجت إلينا فخففت، ثم دخلت فأطلت؟ قال: من أجلكم فعلت.

الأعظمي 2732حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Minor actions do not invalidate the prayer
Section
One who shortens the night prayer for the sake of others and lengthens it for himself
Numbering
Jami al-Kamil 2732 (2nd edition)
Azami 2732