Sunan an-Nasa'i, Hadith 722 ⓘ
It was narrated from Ibn 'Umar, that when he was young and single, with no family, at the time of the Messenger of Allah, he used to sleep in the Masjid of the Prophet.
أَخْبَرَنَا عُبَيْدُ اللَّهِ بْنُ سَعِيدٍ، قَالَ حَدَّثَنَا يَحْيَى، عَنْ عُبَيْدِ اللَّهِ، قَالَ أَخْبَرَنِي نَافِعٌ، عَنِ ابْنِ عُمَرَ، أَنَّهُ كَانَ يَنَامُ وَهُوَ شَابٌّ عَزْبٌ لاَ أَهْلَ لَهُ عَلَى عَهْدِ رَسُولِ اللَّهِ صلى الله عليه وسلم فِي مَسْجِدِ النَّبِيِّ صلى الله عليه وسلم .
also referenced under: Book 8, Hadith 35 (In-Book) & Volume 1, Book 8, Hadith 723 (DarusSalam)