The Four Recommended Ways of Sitting
The Prophet ﷺ’s sitting was generally of four forms. The most frequent was ihtiba’, then tarabbu’, then qarfaṣa’, then iq’a’.
➊ Ihtiba’
In Arabic, ihtiba’ means sitting by drawing the knees up and binding them, that is, sitting in the crouched position with the legs drawn up. This was the commonly practised way of sitting among the Arabs, because they lived in deserts and wilderness where there were no walls or the like to lean against. Therefore they sat in this way with their knees drawn up. And from this comes the saying:
الاحتباء حيطان العرب
that ihtiba’ is the walls of the Arabs.
Ihtiba’, or drawing up the knees, means binding the feet and the stomach together with a cloth or with the hands and holding them tight at the waist. Al-Tibi said:
Sitting with both knees raised, soles placed on the ground, and both hands on the shins, is called ihtiba’ (sitting with the knees drawn up).
The permissibility of this way of sitting is shown by the hadith in Sahih al-Bukhari, Sahih Muslim, al-Adab al-Mufrad and al-Manaqib of Imam al-Hakim, in which Abu Hurairah (may Allah be pleased with him) narrates the event of the Prophet ﷺ’s affection for Hasan (may Allah be pleased with him). In it, it is also mentioned that one day the Prophet ﷺ went out of the house and found me in the mosque. He took my hand, and I walked along with the Prophet ﷺ. He ﷺ reached the Qaynuqa’ market, walked around there, and then returned.
حتى جئنا المسجد فجلس فاحتبى
Until we came back to the mosque, and the Prophet ﷺ sat down in ihtiba’.
Also, the ihtiba’ of Abu Sa’id (may Allah be pleased with him) himself is established in a hadith of Sahih al-Bukhari
. However, if a person is wearing only one garment, in which sitting this way would risk exposing his private parts, then such sitting is prohibited. Accordingly, the prohibition in the hadith of Abu Sa’id al-Khudri (may Allah be pleased with him) in Bukhari, Muslim and Nasa’i is to be understood as applying to that state, in which he narrates that the Prophet ﷺ forbade two kinds of sale and purchase and two kinds of clothing. In it is:
واللبسة الأخرى احتباء بثوبه وحابس ليس على فرجه منه
And the second prohibited manner of dress is that a person sits and uses his only cloth for ihtiba’, while there is no cloth covering his private parts.
So this prohibition applies only when one is wearing a single sheet. Because in this way the private parts are sometimes exposed.
➋ Tarabbu’:
In Arabic, tarabbu’ means sitting cross-legged. In our language we also call it sitting cross-legged (chokri marna). In this regard, Hanzalah ibn Khuzaym (may Allah be pleased with him) narrates, as recorded by Imam al-Bukhari in al-Adab al-Mufrad, al-Isti’ab of Ibn Abd al-Barr and Tahdhib al-Kamal of al-Mizzi:
آتيت النبى صلى الله عليه وسلم فرأيته جالسا متربعا
I came into the presence of the Prophet ﷺ and saw him sitting cross-legged.
And in Sahih Muslim, Abu Dawud, Tirmidhi and Nasa’i, Jabir ibn Samurah (may Allah be pleased with him) narrates:
كان النبى صلى الله عليه وسلم إذا صلى الفجر تربع فى مجلسه حتى تطلع الشمس حسناء
The Prophet ﷺ, after the Fajr prayer, would remain sitting cross-legged in his place until the sun had risen well.
Similarly, in al-Adab al-Mufrad and Ma’ani al-Athar of al-Tahawi, Imran ibn Muslim narrates:
رأيت أنس بن مالك يجلس هكذا متربعا ويضع إحدى قدميه على الأخرى
I saw Anas ibn Malik (may Allah be pleased with him) sitting cross-legged in this way, with one foot placed over the other.
There are also some reports about sitting cross-legged in chokri, which indicate the permissibility and legitimacy of sitting in this manner.
And it is narrated from some Companions:
لم ير متربعا قط
that the Prophet ﷺ was never seen sitting cross-legged.
Regarding this, Allamah Waheed al-Zaman (may Allah have mercy on him) wrote that perhaps this narrator did not see it.
➌ Qarfasa’:
The third way of sitting is qarfasa’, when the Arabs say:
قرفص الرجل
meaning the man sat on his feet and joined his thighs to his shins.
It is also called isfaz, that is, squatting, which is done in haste or in a state of need. We also call it sitting on the feet. This way is also established from the Prophet ﷺ. Accordingly, in Abu Dawud and Tirmidhi, al-Adab al-Mufrad and al-Tabarani, Qaylah (may Allah be pleased with her) narrates:
رأيت النبى صلى الله عليه وسلم قاعدا القرصفاء
I saw the Prophet ﷺ sitting in qarfasa’ (that is, on his feet).
➍ Iq’a’:
The fourth way of sitting is iqa’, and iqa’ is of two kinds. Thus, in Majma’ al-Bihar it is stated that iqa’ in prayer is that a person places his buttocks on the ground, raises his thighs and shins, and places both hands on the ground. Abu Ubayd has also said the same.
This iqa’ is prohibited in prayer; rather, it has been described as the way a dog sits. The Prophet ﷺ forbade sitting in this manner during the tashahhud. Thus, in Musnad Ahmad, Tayalisi and Musannaf Ibn Abi Shaybah, Hadrat Abu Hurairah (may Allah be pleased with him) says:
نهاني خليلي صلى الله عليه وسلم عن إقعاء كاقعاء الكلب
The Prophet ﷺ forbade me from sitting in iqa’ like a dog.
However, the second form of this iqa’ is that the soles of the feet are on the ground, the feet are upright, and a person sits on his heels with his buttocks resting on them. Sitting in this manner between the two prostrations and in ordinary circumstances is permissible, as is found in Sahih Muslim, Abu Awanah and Bayhaqi:
وهي سنة نبيك صلى الله عليه وسلم و كان أحيا نا يقعي
This is the sunnah of your Prophet ﷺ; he sometimes sat in iqa’ as well.
Likewise, in Muslim, Abu Dawud and Tirmidhi, the permissibility of this is narrated from Hadrat Ibn Abbas (may Allah be pleased with them both), and he has declared it to be sunnah. Also, in Bayhaqi, this is narrated from Hadrat Ibn Umar (may Allah be pleased with them both) through a sahih or at least hasan chain.
And Abu Ishaq al-Harbi, in his book Gharib al-Hadith, narrates through a sahih chain the statement of Imam Tawus:
إنه رأى ابن عمر و ابن عباس يقعيان
I saw Hadrat Ibn Umar and Ibn Abbas (may Allah be pleased with them both) performing iqa’.
In sum, these four forms of sitting were known among the Arabs, and the Prophet ﷺ too would sit in these different manners at different times.
Coming to the Point:
Hafiz Ibn Hajar (may Allah have mercy on him), quoting Imam Khattabi in Fath al-Bari, has written that the prohibition on lying down with one foot placed over the other has been abrogated, or else the prohibition must be understood as applying to the case where there is a fear of the private parts being exposed. As for permissibility, it applies to the other, covered form. Imam Bayhaqi and Baghawi also accepted this same method of reconciliation. Ibn Battal and his companions also adopted the view of abrogation. Whereas Hafiz Ibn Abd al-Barr (may Allah have mercy on him) wrote in Sharh al-Muwatta that:
Imam Malik (may Allah have mercy on him) first cited the practical hadith of the Prophet ﷺ lying in the mosque with one foot over the other, and then narrated that Hadrat Umar and Uthman (may Allah be pleased with them both) also did the same. From this it becomes clear that Imam Malik (may Allah have mercy on him) regarded the hadiths of prohibition as abrogated.
Whereas Imam Mazari stated a view distinct from all others, that lying in this manner was among the special features of the Prophet ﷺ and is not for ordinary people.
But Hafiz Ibn Hajar made an excellent assessment on this matter and wrote that:
The practice of the Rightly Guided Caliphs (may Allah be pleased with them) is clear evidence that this was by no means among the special features of the Prophet ﷺ, for otherwise they would never have done it (whereas it is widely reported from them that they lay in this manner). And the claim of abrogation is also not correct, because a matter cannot be regarded as abrogated merely on the basis of possibility. And he considered the best position to be that the hadith of prohibition applies to the situation in which (by raising a knee and placing the foot on it) there is a fear of the private parts being exposed; and the hadith of permissibility applies to that (first) form in which (by stretching out the feet and placing one over the other) there is no fear of the private parts being exposed.
And he has also quoted support for this from Imam Bayhaqi and Baghawi (may Allah have mercy on them) and other muhaddithun, and declared it to be the preferable view.
And Imam Khattabi and Imam Baghawi have said that these earlier hadiths indicate that sitting while leaning in the mosque, and resting or relaxing in any other manner, is permissible.
➋ Not Lying on the Stomach:
And among the etiquettes of sleeping and lying down in the mosque, and indeed at home or in any place, the second etiquette is that one should not lie down on one’s stomach. Thus, in Sunan Abi Dawud
, it is narrated by Ya’ish ibn Tihfa ibn Qays al-Ghifari on the authority of his father Tihfa (may Allah be pleased with him), and similarly in al-Nasa’i, Ibn Majah and al-Adab al-Mufrad it is narrated with a continuous chain (mawsul), and in Sharh al-Sunnah of al-Baghawi with a suspended chain (ta’liq), that he said:
I was sleeping on my stomach in the mosque when the Prophet ﷺ took hold of my foot and shook it, and said:
إنها ضجعة يبغضها الله
This manner of sleeping displeases Allah, the Exalted.
And a second hadith that supports and corroborates this hadith is in Sunan al-Tirmidhi, Kitab
, in which Abu Hurayrah (may Allah be pleased with him) reports:
رأى رسول الله صلى الله عليه وسلم رجلا مضطجعا على بطنه فقال: إن هذه ضجعة لا يحبها الله
The Prophet ﷺ saw a man lying on his stomach, and he said: “This manner of lying down is such that Allah does not like it.”
And a third hadith is narrated in Sunan Ibn Majah from Abu Dhar al-Ghifari (may Allah be pleased with him), in which he says:
مر بي النبى صلى الله عليه وسلم وأنا مضطجع على بطني فركضني برجله وقال: يا جنيدب إنما هذه ضجعة أهل النار
The Prophet ﷺ passed by me while I was lying on my stomach. He moved me with his foot and said: “O Junaydib! This manner of lying down is that of the people of Hell.”
A similar hadith with the same meaning is also narrated from Abu Umamah (may Allah be pleased with him) in al-Adab al-Mufrad of Imam al-Bukhari and in Ibn Majah. In it is:
فإنها نومة جهنمية
That this manner is that of the people of Hell.
However, the chain of this hadith is weak.
In sum, keeping in view the aforementioned hadiths whose chains are sahih and firm, those people (men and women) who have become accustomed to sleeping on their stomach should reconsider their conduct, those who say that they cannot sleep in any other way. Their statement carries no weight, because within a few days they can abandon this bad habit and form the habit of sleeping in the Sunnah manner. And a few days of discomfort is certainly far better than continuous divine wrath. And where elders sleep in this unlawful manner, this habit will certainly pass on to children as well.
Therefore, such people should seriously reflect on this and immediately abandon this ugly habit. And if this habit has taken root not among elders but only among children, then parents should firmly prevent them from sleeping in this way, so that they neither incur Allah’s displeasure for their whole lives, nor let a portion of it accumulate in the parents’ account due to lack of upbringing.نسال الله العافية
➌ Lying on the right side:
And while the etiquettes of sleeping are being discussed, let us also mention here a third etiquette, which, like the earlier ones, relates not only to sleeping in the mosque, but should be observed whether one sleeps at home or anywhere else. Because this is the Sunnah and preferred etiquette of the Prophet ﷺ, and this etiquette is lying on the right side. Thus, in Sahih al-Bukhari and Muslim, Abu Dawud and al-Tirmidhi, al-Adab al-Mufrad, ‘Amal al-Yawm wal-Layla of al-Nasa’i, Musnad Abi ‘Awanah and Musnad Ahmad, al-Bara’ ibn ‘Azib (may Allah be pleased with him) reports that the Prophet ﷺ addressed me and said:
إذا آتيت مضجعك فتوضأ وضوءك للصلاة ثم اضطجع على شقك الأيمن
When you come to your bed to sleep, first perform wudu like the wudu for prayer, and then lie down on your right side or flank.
And he further said that one should make this supplication:
اللهم أسلمت نفسي إليك ووجهت وجهي إليك وفوضت أمري إليك وألجأت ظهري إليك رغبة ورهبة إليك ولا ملجأ ولا منجا منك إلا إليك آمنت بكتابك الذى أنزلت، وبنبيك الذى أرسلت
O Allah, I have submitted myself to You, turned my face to You, entrusted my affair to You, and leaned my back upon You, out of hope and fear of You. There is no refuge and no escape from You except to You. I believe in Your Book which You have sent down, and in Your Prophet whom You have sent.
After teaching this supplication, the Prophet ﷺ said that one should make these words the last words before sleeping:
فإن مت من ليلتك مت على الفطرة
“If you die during that night, you die upon the fitrah.”
➍ Placing the right cheek on the right palm:
Another of the etiquettes of sleep, the fourth, is that when one goes to sleep, apart from lying on the right side, one should place the right cheek on the palm of the right hand. This is because it is narrated in Sahih Muslim
, Abu Dawud and al-Tirmidhi
, al-Nasa’i
, Musannaf Ibn Abi Shaybah, Ibn Majah, Musnad Abi Layla, Musnad Ahmad and al-Bazzar, al-Adab al-Mufrad, and Amal al-Yawm wal-Laylah of Ibn al-Sunni, from Hadrat al-Bara’ ibn Azib (may Allah be pleased with him), Hadrat Hudhayfah ibn al-Yaman (may Allah be pleased with him), and Umm al-Mu’minin Hadrat Hafsah bint Umar al-Faruq (may Allah be pleased with her):
أن النبى صلى الله عليه وسلم كان إذا أراد أن يرقد وضع يده اليمنى تحت حده، ثم يقول اللهم قني عذابك يوم تبعث عبادك
When the Prophet ﷺ was about to sleep, he would place his right hand under his cheek, and then recite this supplication: O Allah, save me from Your punishment on the day when You raise Your servants (to life in the Hereafter).
➎ Making supplication:
Both of these narrations also include, besides the two etiquettes, two supplications which the Prophet ﷺ used to make while sleeping. There are many other supplications for this time as well, some of which are these, for example:
باسمك أموت وأحيا
O Allah, in Your name I die (i.e., sleep) and I live (i.e., wake up).
And in the same hadith it is said that when the Prophet ﷺ woke from sleep, he would make this supplication:
الحمد لله الذى أحيانا بعد ما أماتنا وإليه النشور
All praise is for Allah, who gave us life (i.e., woke us) after causing us to die (i.e., sleep), and to Him is the resurrection.
These same words of the first supplication are also narrated in Sahih Muslim, Musnad Ahmad, and Amal al-Yawm wal-Laylah of al-Nasa’i from Hadrat al-Bara’ ibn Azib (may Allah be pleased with him), and in Sahih al-Bukhari, Amal al-Yawm wal-Laylah of al-Nasa’i and some other books from Hadrat Abu Dharr al-Ghifari (may Allah be pleased with him).
Whereas it is narrated in Sahih al-Bukhari and Muslim, Abu Dawud and al-Tirmidhi, Ibn Majah, and Musnad Ahmad and Amal al-Yawm wal-Laylah of al-Nasa’i from Umm al-Mu’minin Hadrat Aisha al-Siddiqah (may Allah be pleased with her) that the Prophet ﷺ, every night when he went to his bed to sleep, would join his two palms, blow into them, and recite over them (the three surahs) ﴿قل هو الله احد، قل اعوذ برب الفلق اور قل اعوذ برب الناس﴾, and then pass his two hands over as much of his body as possible. He would begin with his head and face, and pass his hands over the front part of his body, and he would do this three times.
In Sahih al-Bukhari, in the Book of Wakalah, Hadrat Abu Hurairah (may Allah be pleased with him) narrates that someone would steal some of the dates of charity every night. On the third night I caught him and said that I would take his matter before the Prophet ﷺ. He said: Leave me, and I will tell you some beneficial words. The Companions (may Allah be pleased with them) were indeed very keen and eager for good and benefit.
He said that when you go to your bed to sleep, recite Ayat al-Kursi:
﴿الله لا إله إلا هو الحي القيوم﴾
to the end. A guardian from Allah will be appointed over you, and neither the devil nor a thief will come near you until morning. The Prophet ﷺ then said:
صدقك وهو كذوب ذاك الشيطان
He spoke the truth, though he himself is a great liar. That was the devil.
And in Sahih al-Bukhari and Muslim, Hadrat Abu Mas’ud al-Ansari (may Allah be pleased with him) narrates that the Prophet ﷺ said:
من قرأ الآيتين من آخر سورة البقرة فى ليلة كفتاه
Whoever recites the last two verses of Surah al-Baqarah at night (while going to sleep), they suffice for him.
In Sahih al-Bukhari and Muslim, Abu Dawud and al-Tirmidhi, Musannaf Abd al-Razzaq and Ibn al-Sunni, it is narrated from Hadrat Ali (may Allah be pleased with him) that Hadrat Fatimah al-Zahra (may Allah be pleased with her), the beloved daughter of the Messenger of Allah, came to the Prophet ﷺ and requested a servant. (That night) the Prophet ﷺ came to our house when we had already lain down on our beds, and said:
ألا أدلكما على ما هو خير لكما من خادم
Shall I not tell you of a remembrance which will prove far better for you than a servant?
Then the Prophet ﷺ told them that at bedtime they should say Subhan Allah thirty-three (33) times, Alhamdulillah thirty-three (33) times, and Allahu Akbar thirty-four (34) times. This will be better for you than a servant.
(Hadrat Ali (may Allah be pleased with him) said that from that day onward he never abandoned this practice. He was asked whether he did not (abandon it) even on the night of the Battle of Siffin, and he said that he did not abandon it even on the night of Siffin.)
So for women who become tired from doing household chores, and indeed for men and women alike, this is the excellent remembrance and practice, or prescription, taught by the Prophet ﷺ.
➏ Getting up from bed once upon waking and then sleeping again:
The sixth of the etiquettes of sleep is narrated in Sahih al-Bukhari, Sahih Muslim, Tirmidhi, and Ibn al-Sunni’s Amal al-Yawm wal-Laylah, from Abu Hurayrah (may Allah be pleased with him) that when a person wakes from sleep, gets up from his bed, and then returns to sleep, he should shake out his bed a little. This hadith also contains a supplication for the time of sleep. He narrates that:
The Prophet ﷺ said: When any one of you gets up from his bed and goes somewhere, and then returns to his bed, he should:
فلينفضه بطرف إزاره فإنه لا يدري ما خلفه عليه بعده
He should shake out his bed with the corner of his waist-wrapper (or some cloth), because he does not know what may have come onto his bed after him (i.e., some poisonous insect may have entered).
Then the Prophet ﷺ further said that when lying down, this supplication should be made:
باسمك ربي وضعت جنبي وبك أرفعه فإن أمسكت نفسي فارحمها وإن أرسلتها فاحفظها بما تحفظ به عبادك الصالحين
O my Lord! In Your name I have laid my side upon the bed, and by Your grace I will raise it. If You take my soul, then have mercy upon it. And if You send it back, then protect it in the way You protect Your righteous servants.
And in the third hadith mentioned earlier, there was also a supplication for waking up. According to the narration of Tirmidhi, another supplication is also reported in this hadith, and in Ibn al-Sunni only this supplication is found. Thus the Prophet ﷺ said that when any one of you wakes up, he should make this supplication:
الحمد لله الذى عافاني فى جسدي ورد على روحي وأذن لي بذكره
All praise is for Allah, who granted me physical well-being, returned my soul to me (woke me up), and enabled me to remember Him.
➐ The seventh of the etiquettes of sleep is that a person sleeps in a state of wudu while engaged in the remembrance of Allah. If such a person wakes in the night and makes any supplication, Allah accepts his supplication. Thus, Abu Dawud, al-Nasa’i, Ibn Majah, Musnad Ahmad and Musnad al-Tayalisi narrate from Mu’adh ibn Jabal (may Allah be pleased with him) that the Prophet ﷺ said:
ما من مسلم يبيت على ذكر طاهرا فيتعار من الليل فيسأل الله تعالى خيرا من أمر الدنيا والآخرة إلا أعطاه الله إياه
Any Muslim who sleeps in a state of wudu while engaged in the remembrance of Allah, and then wakes at some hour of the night and makes any supplication for any good of this world or the Hereafter, Allah grants him that thing.
And Imam Abu Dawud has recorded another hadith in
which is also found in the Sahihayn and the Sunan al-Arba’ah. Ibn Abbas (may Allah be pleased with them both) narrates:
إن رسول الله صلى الله عليه وسلم قام من الليل فقضى حاجته قال أبو داود يعني بال فغسل وجهه ويديه ثم نام
The Prophet ﷺ got up during the night. When he finished relieving himself (and according to Imam Abu Dawud, urinating), he washed his blessed face and both hands (i.e., performed wudu) and then slept.
And a third hadith is narrated in Sahih Ibn Hibban from Ibn Umar (may Allah be pleased with them both), in which the Prophet ﷺ said:
من بات طاهرا بات فى شعاره ملك فلا يستيقظ إلا قال الملك اللهم اغفر لعبدك فلان فإنه بات طاهرا
Whoever sleeps in a state of wudu, an angel is attached to him (in his shi’ar, i.e., with him). When that person wakes, the angel makes supplication: O Allah! Forgive Your servant so-and-so, for he spent the night in a state of wudu.
And a fourth hadith on the same subject is narrated in al-Tabarani’s al-Awsat and al-Mu’jam al-Kabir, also from Ibn Umar (may Allah be pleased with them both), in which he says that the Prophet ﷺ said:
طهروا هذه الأجساد فيطهركم الله فإنه ليس من عبد يبيت طاهرا إلا بات معه فى شعاره ملك لا ينقلب ساعة من الليل إلا قال: اللهم اغفر لعبدك فإنه بات طاهرا
Keep your bodies clean, and Allah will purify you. Whoever spends the night in a state of wudu, an angel (in his shi’ar) spends the night with him. And whenever that person turns over at any time of the night, the angel makes supplication: O Allah! Forgive this servant of Yours, for he slept in a state of wudu.
From these four hadiths it becomes clear that one of the etiquettes of sleep is that a person sleeps in a state of wudu, and sleeps while engaged in remembrance and supplication, and that there is great virtue and blessing in acting upon this etiquette.
The remembrances, supplications and virtues for the time of waking and especially for the time of sleep are mentioned abundantly in the books of hadith, which are based on numerous and authentic chains. But we are content with these few remembrances and supplications.
Returning to the Main Topic:
When the discussion of the permissibility of sleeping in the mosque began, the etiquettes of sleeping in the mosque and in a general place have also been discussed to the necessary extent. والحمد لله على ذالك
A Woman Sleeping in the Mosque:
Here we should also clarify that sleeping in the mosque is permitted only out of necessity, so the limits must not be exceeded in this matter. Secondly, just as it is permissible for men to sleep in the mosque when necessary, it is equally permissible for women, provided there is safety from temptation and appropriate arrangements for it. As mentioned earlier, the hadith of the righteous woman who used to clean the Prophet’s Mosque has already passed, in which a tent was set up for her in the Prophet’s Mosque where she would stay.
Similarly, the second evidence for this is the hadith narrated by Umm al-Mu’minin Hadrat Aisha Siddiqa (may Allah be pleased with her) in Sahih al-Bukhari, Ibn Hibban and Sahih Ibn Khuzaymah. In it she narrates, in the woman’s own words, the story of a slave-girl who was set free by her masters. But while she was still with them, a young girl of theirs came wearing a red necklace, and she placed it somewhere or it fell from her. A kite came, thought it was meat, and snatched it away. They searched around, and then accused the woman of having stolen it. They searched every part of her body, even her private parts. She says:
فدعوت الله أن يبرئني
I asked Allah to establish my innocence.
Then she says that by Allah, while she was still standing with them, the kite passed by and dropped the necklace, which fell right in the middle of them. So I said: “This is the thing you accused me of stealing, and I am innocent of it.” Then that woman came to the Prophet ﷺ and embraced Islam. Hadrat Aisha (may Allah be pleased with her) says:
فكان لها خباء فى المسجد أو حفش
A tent was set up for her in the Prophet’s Mosque, or a small house was built for her.
Hadrat Aisha (may Allah be pleased with her) further says that this woman would keep coming to my house, and whenever she came she would certainly recite this verse upon sitting:
ويوم الوشاح من تعابيب ربنا
ألا أنه من بلدة الكفر أنجاني
That day too was among the wonders of Allah’s power, the day the loss of the necklace occurred, which ultimately became the cause of rescuing me from that town of disbelief (my becoming Muslim).
Hadrat Aisha (may Allah be pleased with her) says that:
When she recited the verse every time she came, one day I finally asked her the reason, and she related to me this whole account.
From this hadith it is known that a person who has no home or place to stay, even if she is a woman, is permitted to sleep in the mosque at midday and at night, provided that setting up a tent in the mosque in this way does not give rise to any fear of temptation or disorder.