Mishkat al-Masabih 1295
عَنْ زَيْدِ بْنِ ثَابِتٍ: أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ اتَّخَذَ حُجْرَةً فِي الْمَسْجِدِ مِنْ حَصِيرٍ فَصَلَّى فِيهَا لَيَالِيَ حَتَّى اجْتَمَعَ عَلَيْهِ نَاسٌ ثُمَّ فَقَدُوا صَوْتَهُ لَيْلَةً وَظَنُّوا أَنَّهُ قَدْ نَامَ فَجَعَلَ بَعْضُهُمْ يَتَنَحْنَحُ لِيَخْرُجَ إِلَيْهِمْ. فَقَالَ: مَا زَالَ بِكُمُ الَّذِي رَأَيْتُ مِنْ صَنِيعِكُمْ حَتَّى خَشِيتُ أَنْ يُكْتَبَ عَلَيْكُمْ وَلَوْ كُتِبَ عَلَيْكُمْ مَا قُمْتُمْ بِهِ. فَصَلُّوا أَيُّهَا النَّاسُ فِي بُيُوتِكُمْ فَإِنَّ أَفْضَلَ صَلَاةِ الْمَرْء فِي بَيته إِلَّا الصَّلَاة الْمَكْتُوبَة)
From Zayd ibn Thabit: The Prophet ﷺ made an enclosure in the mosque out of a mat and prayed in it for some nights, until people gathered to him. Then one night they did not hear his voice and thought that he had fallen asleep, so some of them began clearing their throats so that he would come out to them. He said: "What I have seen of your doing has continued with you until I feared that it would be prescribed for you, and if it were prescribed for you, you would not keep it up. So pray, O people, in your houses, for the best prayer of a man is in his house, except the obligatory prayer."