Sunan an-Nasa'i 1599
It was narrated from Zaid bin Thabit that :
The Prophet (ﷺ) used some palm fiber mats to section off a small area in the masjid. And the Messenger of Allah (ﷺ) prayed in it for several nights until the people gathered around him. Then, one night they did not hear his voice, and they thought that he was sleeping, so they cleared their throats to make him come out to them. He said: 'You kept doing that until I feared that it would be made obligatory for you, and if it were made obligatory, you would not be able to do it. O people, pray in your houses, for the best prayer a person offers is in his house, apart from the prescribed (obligatory) prayers.'"
أَخْبَرَنَا أَحْمَدُ بْنُ سُلَيْمَانَ، قَالَ حَدَّثَنَا عَفَّانُ بْنُ مُسْلِمٍ، قَالَ حَدَّثَنَا وُهَيْبٌ، قَالَ سَمِعْتُ مُوسَى بْنَ عُقْبَةَ، قَالَ سَمِعْتُ أَبَا النَّضْرِ، يُحَدِّثُ عَنْ بُسْرِ بْنِ سَعِيدٍ، عَنْ زَيْدِ بْنِ ثَابِتٍ، أَنَّ النَّبِيَّ صلى الله عليه وسلم اتَّخَذَ حُجْرَةً فِي الْمَسْجِدِ مِنْ حَصِيرٍ فَصَلَّى رَسُولُ اللَّهِ صلى الله عليه وسلم فِيهَا لَيَالِيَ حَتَّى اجْتَمَعَ إِلَيْهِ النَّاسُ ثُمَّ فَقَدُوا صَوْتَهُ لَيْلَةً فَظَنُّوا أَنَّهُ نَائِمٌ فَجَعَلَ بَعْضُهُمْ يَتَنَحْنَحُ لِيَخْرُجَ إِلَيْهِمْ فَقَالَ ‏
"‏ مَا زَالَ بِكُمُ الَّذِي رَأَيْتُ مِنْ صُنْعِكُمْ حَتَّى خَشِيتُ أَنْ يُكْتَبَ عَلَيْكُمْ وَلَوْ كُتِبَ عَلَيْكُمْ مَا قُمْتُمْ بِهِ فَصَلُّوا أَيُّهَا النَّاسُ فِي بُيُوتِكُمْ فَإِنَّ أَفْضَلَ صَلاَةِ الْمَرْءِ فِي بَيْتِهِ إِلاَّ الصَّلاَةَ الْمَكْتُوبَةَ ‏"‏ ‏.‏