Bulugh al-Maram 403
وَعَنْ زَيْدِ بْنِ ثَابِتٍ - رضي الله عنه - قَالَ: احْتَجَرَ رَسُولُ اللَّهِ - صلى الله عليه وسلم - حُجْرَةً بِخَصَفَةٍ, فَصَلَّى فِيهَا, فَتَتَبَّعَ إِلَيْهِ رِجَالٌ, وَجَاءُوا يُصَلُّونَ بِصَلَاتِهِ ... الْحَدِيثَ, وَفِيهِ: «أَفْضَلُ صَلَاةِ الْمَرْءِ فِي بَيْتِهِ إِلَّا الْمَكْتُوبَةَ». مُتَّفَقٌ عَلَيْهِ.
Zayd ibn Thabit, may Allah be pleased with him, said: The Messenger of Allah ﷺ partitioned off a small room with a palm-leaf mat and prayed in it. Some men followed him and came to pray along with his prayer... [And he mentioned] the hadith, and in it: "The best prayer of a person is in his house, except the obligatory [prayer]." Agreed upon.