كتاب صلاة المسافرين وقصرها
6  
The Book of Prayer - Travellers
(29)
Chapter: It is recommended to offer voluntary prayers in one’s house although it is permissible to offer them in the masjid
(29)
باب اسْتِحْبَابِ صَلاَةِ النَّافِلَةِ فِي بَيْتِهِ وَجَوَازِهَا فِي الْمَسْجِدِ ‏‏
Sahih Muslim 777 b

Ibn 'Umar reported Allah's Apostle (ﷺ) as saying:

Pray in your houses, and do not make them graves.
وَحَدَّثَنَا ابْنُ الْمُثَنَّى، حَدَّثَنَا عَبْدُ الْوَهَّابِ، أَخْبَرَنَا أَيُّوبُ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ صَلُّوا فِي بُيُوتِكُمْ وَلاَ تَتَّخِذُوهَا قُبُورًا ‏"‏ ‏.‏
Reference : Sahih Muslim 777b
In-book reference : Book 6, Hadith 249
USC-MSA web (English) reference : Book 4, Hadith 1704
  (deprecated numbering scheme)