Sunan Ibn Majah, Book 4, Hadith 17 (Ibn Majah 751)

It was narrated that Ibn 'Umar said:

"We used to sleep in the mosque at the time of the Messenger of Allah."