Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ahmad:5839Wakīʿ > al-ʿUmarī > Nāfiʿ > Ibn ʿUmar

[Machine] I did not have a place to spend the night or find shelter except in the mosque during the time of the Messenger of Allah ﷺ .  

أحمد:٥٨٣٩حَدَّثَنَا وَكِيعٌ حَدَّثَنَا الْعُمَرِيُّ عَنْ نَافِعٍ عَنِ ابْنِ عُمَرَ قَالَ

مَا كَانَ لِي مَبِيتٌ وَلَا مَأْوَى عَلَى عَهْدِ رَسُولِ اللهِ ﷺ إِلَّا فِي الْمَسْجِدِ