Ayesha reported,

The Messenger of Allah ﷺ used to pray at night in his chamber, and the wall of the chamber was low, so the people could see his figure. Some of them stood up and began praying along with his prayer. In the morning they spoke about it. The next night he stood to pray again, and a group of people stood with him praying his prayer. They did this for two or three nights.After that, the Messenger of Allah ﷺ remained sitting and did not come out. When morning came, the people mentioned this to him, and he said, "I feared that the night prayer might be made obligatory upon you."

Azami 2339

Sahih

عن عائشة قالت

كان رسول الله ﷺ يصلي من الليل في حجرته وجدار الحجرة قصير، فرأى الناس شخص النبي ﷺ، فقام أناس يصلون بصلاته، فأصبحوا فتحدثوا بذلك، فقام الليلة الثانية، فقام معه أناس يصلون بصلاته، صنعوا ذلك ليلتين أو ثلاثا، حتى إذا كان بعد ذلك جلس رسول الله ﷺ- فلم يخرج-، فلما أصبح ذكر ذلك الناس، فقال: إني خشيت أن تكتب عليكم صلاة الليل.

الأعظمي 2339صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Leadership
Section
Man following the imam when there is a wall between them
Numbering
Jami al-Kamil 2339 (2nd edition)
Azami 2339