The Prophet ﷺ set up a small enclosure of reed matting inside the mosque, and the Messenger of Allah ﷺ prayed within it for several nights until people gathered around him. One night they missed the sound of his voice and assumed he had gone to sleep, so some of them began clearing their throats hoping he would come out to them.He said, "What you have been doing has continued until I feared it might be made obligatory upon you, and had it been made obligatory, you would not have been able to keep it up. So pray in your homes, people, for the best prayer a person offers is in his home, except for the prescribed prayers."
حدثنا إسحاق أخبرنا عفان حدثنا وهيب حدثنا موسى بن عقبة سمعت أبا النضر يحدث عن بسر بن سعيد
أن النبي ﷺ اتخذ حجرة في المسجد من حصير فصلى رسول الله ﷺ فيها ليالي حتى اجتمع إليه ناس ثم فقدوا صوته ليلة فظنوا أنه قد نام فجعل بعضهم يتنحنح ليخرج إليهم فقال ما زال بكم الذي رأيت من صنيعكم حتى خشيت أن يكتب عليكم ولو كتب عليكم ما قمتم به فصلوا أيها الناس في بيوتكم فإن أفضل صلاة المرء في بيته إلا الصلاة المكتوبة