Messenger of Allah ﷺ made a small room in the month of Ramadan (Saʿid said, "I think that Zaid bin Thabit said that it was made of a mat") and he prayed there for a few nights, and so some of his companions prayed behind him. When he came to know about it, he kept on sitting. In the morning, he went out to them and said, "I have seen and understood what you did. You should pray in your houses, for the best prayer of a person is that which he prays in his house except the compulsory prayers." (Using translation from Bukhārī 731)
أَنَّ رَسُولَ اللهِ ﷺ اتَّخَذَ حُجْرَةً قَالَ حَسِبْتُ أَنَّهُ قَالَ مِنْ حَصِيرٍ فِي رَمَضَانُ فَصَلَّى فِيهَا لَيَالِيَ وَفِي رِوَايَةِ الْمِرْثَدِيِّ لَيْلَتَيْنِ فَصَلَّى بِصَلَاتِهِ نَاسٌ مِنْ أَصْحَابِهِ فَلَمَّا عَلِمَ بِهِمْ جَعَلَ يَقْعُدُ فَخَرَجَ إِلَيْهِمْ فَقَالَ قَدْ عَرَفْتُ الَّذِي رَأَيْتُ مِنْ صَنِيعِكُمْ فَصَلُّوا أَيُّهَا النَّاسُ فِي بُيُوتِكُمْ فَإِنَّ أَفْضَلَ الصَّلَاةِ صَلَاةُ الْمَرْءِ فِي بَيْتِهِ إِلَّا الْمَكْتُوبَةَ وَفِي رِوَايَةِ الْمَرْوَزِيِّ وَالْمِرْثَدِيِّ عَنْ سَالِمٍ أَبِي النَّضْرِ