Sahih Muslim , Hadith 781 ⓘ
Zaid b. Thabit reported: The Messenger of Allah made an apartment with the help of the leaves of date trees or of mats. The Messenger of Allah went out to pray in it. People followed him and came to pray with him. Then they again came one night and waited (for him), but the Messenger of Allah delayed in coming out to them. And when he did not come out, they cried aloud and threw pebbles at the door. The Messenger of Allah came out in anger and said to them: By what you have been constantly doing, I was inclined to think that it (prayer) might not become obligatory for you. So you must observe prayer (optional) in your houses, for the prayer observed by a man in the house is better except an obligatory prayer.
وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ سَعِيدٍ، حَدَّثَنَا سَالِمٌ أَبُو النَّضْرِ، مَوْلَى عُمَرَ بْنِ عُبَيْدِ اللَّهِ عَنْ بُسْرِ بْنِ سَعِيدٍ، عَنْ زَيْدِ بْنِ ثَابِتٍ، قَالَ احْتَجَرَ رَسُولُ اللَّهِ صلى الله عليه وسلم حُجَيْرَةً بِخَصَفَةٍ أَوْ حَصِيرٍ فَخَرَجَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُصَلِّي فِيهَا - قَالَ - فَتَتَبَّعَ إِلَيْهِ رِجَالٌ وَجَاءُوا يُصَلُّونَ بِصَلاَتِهِ - قَالَ - ثُمَّ جَاءُوا لَيْلَةً فَحَضَرُوا وَأَبْطَأَ رَسُولُ اللَّهِ صلى الله عليه وسلم عَنْهُمْ - قَالَ - فَلَمْ يَخْرُجْ إِلَيْهِمْ فَرَفَعُوا أَصْوَاتَهُمْ وَحَصَبُوا الْبَابَ فَخَرَجَ إِلَيْهِمْ رَسُولُ اللَّهِ صلى الله عليه وسلم مُغْضَبًا فَقَالَ لَهُمْ رَسُولُ اللَّهِ صلى الله عليه وسلم " مَا زَالَ بِكُمْ صَنِيعُكُمْ حَتَّى ظَنَنْتُ أَنَّهُ سَيُكْتَبُ عَلَيْكُمْ فَعَلَيْكُمْ بِالصَّلاَةِ فِي بُيُوتِكُمْ فَإِنَّ خَيْرَ صَلاَةِ الْمَرْءِ فِي بَيْتِهِ إِلاَّ الصَّلاَةَ الْمَكْتُوبَةَ " .
also referenced under: Book 6, Hadith 253 (In-Book) & Book 4, Hadith 1708 (USC-MSA)
Zaid b. Thabit reported that the Messenger of Allah made an apartment in the mosque of mats, and he observed in it prayers for many nights till people began to gather around him, and the rest of the hadith is the same but with this addition: " Had this (Nafl) prayer become obligatory for you, you would not be able to observe it."
وَحَدَّثَنِي مُحَمَّدُ بْنُ حَاتِمٍ، حَدَّثَنَا بَهْزٌ، حَدَّثَنَا وُهَيْبٌ، حَدَّثَنَا مُوسَى بْنُ عُقْبَةَ، قَالَ سَمِعْتُ أَبَا النَّضْرِ، عَنْ بُسْرِ بْنِ سَعِيدٍ، عَنْ زَيْدِ بْنِ ثَابِتٍ، أَنَّ النَّبِيَّ صلى الله عليه وسلم اتَّخَذَ حُجْرَةً فِي الْمَسْجِدِ مِنْ حَصِيرٍ فَصَلَّى رَسُولُ اللَّهِ صلى الله عليه وسلم فِيهَا لَيَالِيَ حَتَّى اجْتَمَعَ إِلَيْهِ نَاسٌ . فَذَكَرَ نَحْوَهُ وَزَادَ فِيهِ " وَلَوْ كُتِبَ عَلَيْكُمْ مَا قُمْتُمْ بِهِ " .
also referenced under: Book 6, Hadith 254 (In-Book) & Book 4, Hadith 1709 (USC-MSA)