Al-Zuhrī was also followed in this report by Ṣāliḥ ibn Abī al-Akhdar, and Aḥmad recorded his version as well.
(b) Sahl ibn Saʿd narrated:
The Messenger of Allah ﷺ came to Fāṭimah’s house and did not find ʿAlī there. He asked, “Where is your cousin?” She replied, “Something occurred between us and he became upset with me, so he left and did not sleep here.” The Messenger of Allah ﷺ then said to a man, “Go and see where he is.” The man came back and said, “O Messenger of Allah, he is over there in the mosque, lying asleep [in the shade of the wall].” So the Messenger of Allah ﷺ went to him while he was lying on the ground, his cloak having slipped off one side of him (in another wording: off his back, and the dust had reached his back). The Messenger of Allah ﷺ began wiping the dust from him as he said,
“Get up, Abū Turāb! Get up, Abū Turāb!”
Al-Bukhārī and Muslim transmit the report through Abū Ḥāzim from Sahl. The first additional phrase is recorded by al-Bukhārī in al-Adab al-Mufrad and in one of his versions in the Ṣaḥīḥ; the second addition is related by al-Ṭabarānī, as cited in Fatḥ al-Bārī, and it also appears in al-Bukhārī, though he omits the word “shade.” The alternative wording is likewise his in another chain. Al-Bayhaqī also recorded the ḥadīth.
There are other reports on this subject, some of which will be cited later.
From these two ḥadiths—and others with the same purport—it is clear that sleeping and taking a midday nap (qaylūlah) in the mosque is permissible for