Zayd bin Thabit reported,

The Prophet ﷺ set up a small enclosure made of reed mats inside the mosque, and the Messenger of Allah ﷺ prayed in it for several nights, until people gathered around him. One night they did not hear his voice and assumed he had fallen asleep, so some of them began clearing their throats hoping he would come out to them.He said, "Your behavior that I observed continued until I feared that this prayer would be made obligatory upon you, and had it been made obligatory, you would not have been able to keep up with it. So pray in your homes, people, for the best prayer a person performs is in his home, except for the obligatory prayers."

Nasai 1600

Sahih

أخبرنا أحمد بن سليمان قال حدثنا عفان بن مسلم قال حدثنا وهيب قال سمعت موسى بن عقبة قال سمعت أبا النضر يحدث عن بسر بن سعيد

عن زيد بن ثابت

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

النسائي 1600صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Night prayer and voluntary prayers of the day
Chapter
Urging prayer in the homes and the virtue therein
Numbering
Darussalam 1600
Nasai 1600