Uthman bin al-Yaman said: When the Muhajirun in Madinah became numerous and they had no house or shelter, the Prophet (peace and blessings be upon him) lodged them in the mosque and named them "the People of the Suffah." He (peace and blessings be upon him) would sit with them and talk with them affectionately.
(b) It is reported from Sa'id bin al-Musayyib (may Allah have mercy on him) that he was asked about sleeping in the mosque, and he said: Where did the People of the Suffah sleep? Meaning that they too slept in the mosque.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4338