We used to sleep in the mosque during the time of the Messenger of Allah ﷺ.
حدثنا إسحق بن منصور حدثنا عبد الله بن نمير أنبأنا عبيد الله بن عمر عن نافع
كنا ننام في المسجد على عهد رسول الله ﷺ
[Its chain is sahih] Ahmad narrated it: 12/2, from the hadith of Ubaydullah, through this chain.