`Abdullah bin `Umar said: I used to sleep in the mosque of the Prophet (ﷺ) while I was young and unmarried.
Sahih al-Bukhari Book 8, Hadith 89