Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) narrates that I used to sleep in the Prophet’s Mosque during the night in the blessed era of the Messenger of Allah (peace and blessings be upon him), even though I was unmarried.
Hadith Referenceصحيح ابن خزيمه / جماع أبواب الأفعال المباحة فى المسجد غير الصلاة وذكر الله / 1330