Shama-il Tirmidhi Chapter 41, Hadith Number 1 (280).
‘Abdullah bin sa’d Radiyallahu ‘Anhu says: “I enquired from Rasulullah Sallallahu ‘Alayhi Wasallam, is it more meritorious to perform nafil salaah in the home or in the masjid? Rasulullah Sallallahu ‘Aayhi Wasallam replied: ‘Do you observe that my house is so near the masjid (which does not make it difficult, or cause a hindrance in coming to the masjid, in spite of all this) I prefer to perform the salaah, besides the faraa-id, in my house, rather than in the masjid”.
As the nawaafil are based on concealment, therefore it is better to perform it in the home, to ensure complete concealment. It keeps away from show and pretence. But certainly, it is undesirable that the faraa-id etc, be concealed. More ajr (thawaab-reward) is gained by performing it in the masjid. Included are also the rak’ahs performed after tawaaf of the Ka’bah, salaatut taraweeh etc. Although the tarawee is not from the faraa-id it is a peculiar feature of Ramadhaan, and is masnun to perform in jamaa’ah (congregation). Likewise is every salaah performed with jamaa’ah like salaah of kusuf (solar eclipse prayer), which are meant to be publicly declared. Therefore it is desirable to perform these in the masjid.