Abdullah bin Saad reported,

I asked the Messenger of Allah ﷺ, "Which is better, praying in my home or praying in the mosque?"He replied, "Do you not see how close my house is to the mosque? Yet I prefer to pray in my home rather than in the mosque, unless it is an obligatory prayer."

Azami 2417

Hasan

عن عبد الله بن سعد قال

سألت رسول الله ﷺ: أيهما أفضل؟ الصلاة في بيتي أو الصلاة في المسجد؟ قال: ألا ترى إلى بيتي؟ ما أقربه من المسجد! فلأن أصلي في بيتي أحب إلي من أن أصلي في المسجد إلا أن تكون صلاة مكتوبة.

الأعظمي 2417حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Sunnah prayers and voluntary prayers in general
Section
Virtue of praying voluntary prayers at home
Numbering
Jami al-Kamil 2417 (2nd edition)
Azami 2417