What should you recite for insomnia or nightmares?
Dua for insomnia
If you have difficulty falling asleep, the Prophetic Dua for this is:
“اللّٰهُمَّ غَارَتِ النُّجُومُ، وَهَدَأَتِ الْعُيُونُ، وَأَنْتَ حَيُّ قَيُّومٌ، لَا تَأْخُذُكَ سِنَةٌ وَلَا نَوْمٌ، يَا حَيُّ يَا قَيُّومُ، أَهْدِئْ لِيَلِي، وَأَنِمْ عَيْنِي”
Allāhumma ghāratin-nujūmu, wa hada’atil-‘uyūnu, wa anta Ḥayyun Qayyūm, lā ta’khudhuka sinatun wa lā nawmun, yā Ḥayyu yā Qayyūm, ahdi’ liyalī, wa anim ‘aynī.
O Allah, the stars have set, the eyes have relaxed, and You are the Ever-Living, the Sustainer of existence. Neither drowsiness nor sleep overtakes You. O Ever-Living, O Sustainer of existence, calm my night and make my eyes rest.’ I said it, and Allah, the Almighty, removed from me the discomfort I had been experiencing.”
Narration about insomnia
: عن زيد بن ثابت رضي الله تعالى عنه قال
شَكَوتُ إلى رسولِ اللهِ صَلَّى اللهُ عليه وسلَّمَ أرَقًا أصابَني، فقال: قُلِ: اللَّهُمَّ غارَتِ النُّجومُ، وهَدأَتِ العُيونُ، وأنت حَيٌّ قيُّومٌ لا تأْخُذُك سِنةٌ ولا نومٌ، يا حَيُّ يا قيُّومُ، أهْدِئْ لَيْلِي، وأنِمْ عَيني. فقُلْتُها، فأذهَبَ
اللهُ عَزَّ وجَلَّ عَنِّي ما كنْتُ أجِدُ.
أخرجه أبو يعلَى والطبراني وإسناده ضعيف
Zayd ibn Thabit (may Allah be pleased with him) said:
“I complained to the Messenger of Allah (peace be upon him) about insomnia that had affected me. He said: ‘Say: O Allah, the stars have set, the eyes have relaxed, and You are the Ever-Living, the Sustainer of existence. Neither drowsiness nor sleep overtakes You. O Ever-Living, O Sustainer of existence, calm my night and make my eyes rest.’ I said it, and Allah, the Almighty, removed from me the discomfort I had been experiencing.” (Weak hadith – Abu Ya’al and Tabarani)
Dua for those who are disturbed in their sleep
A good dua for someone who experiences fear or unease in their dreams, or is afflicted by panic during sleep, is to say upon experiencing such a disturbance. It has been reported in many narrations, including the following:
أَعُوذُ بِكَلِمَاتِ اللهِ التَّامَّةِ مِنْ غَضَبِهِ وَعِقَابِهِ، وَشَرِّ عِبَادِهِ، وَمِنْ هَمَزَاتِ الشَّيَاطِينِ وَأَنْ يَحْضُرُونِ
A‘ūdhu bikalimāti-llāhi at-tāmmati min ghadabihi wa ‘iqābihi, wa sharri ‘ibādihi, wa min hamazāti-ash-shayāṭīn, wa an yaḥḍurūn.
“I seek refuge with the perfect words of Allah from His anger, His punishment, the evil of His servants, from the whispers of the devils, and from their presence.” (Abu Dawood, Tirmidhi)
This dua can be said if you feel frightened at night, or if you experience loneliness in the night. It is a good dua to recite before going to bed.
Narrations about being frightened/feeling lonely in the night
فقد روى أبو داود والترمذي وغيرُهما من حديث عبد الله بن عمرو بن العاص رضي الله عنهما أنَّ رسول الله صلى الله عليه وسلم قال: “إِذَا فَزِعَ أَحَدُكُمْ فِي النَّوْمِ فَلْيَقُلْ: أَعُوذُ بِكَلِمَاتِ اللهِ التَّامَّةِ مِنْ غَضَبِهِ وَعِقَابِهِ، وَشَرِّ عِبَادِهِ، وَمِنْ هَمَزَاتِ الشَّيَاطِينِ وَأَنْ يَحْضُرُونِ، فَإِنَّهَا لَنْ تَضُرَّهُ”.
Abdullah ibn Amr ibn al-As (may Allah be pleased with them) reported that the Messenger of Allah (peace be upon him) said:
“When any of you is frightened in their sleep, let them say: I seek refuge with the perfect words of Allah from His anger, His punishment, the evil of His servants, from the whispers of the devils, and from their presence. Indeed, it will not harm them.” (Abu Dawood)
وروى الإمام أحمد في مسنده عن الوليد بن الوليد رضي الله عنه أنَّه قال: يا رسول الله صلى الله عليه وسلم إنِّي أجدُ وحشةً، قال: “إِذَا أَخَذْتَ مَضْجِعَكَ فَقُلْ: أَعُوذُ بِكَلِمَاتِ اللهِ التَّامَّةِ مِن غَضَبِهِ وَعِقَابِهِ وَشَرِّ عِبَادِهِ، وَمِنْ هَمَزَاتِ الشَّيَاطِينِ وَأن يَحْضُرُونِ، فَإِنَّهُ لاَ يَضُرُّكَ وبالحَرِيِّ أَنْ لاَ يَقْرَبك”.
Al-Walid ibn Al-Walid (may Allah be pleased with him) once said:
“O Messenger of Allah (peace be upon him), I feel a sense of unease/loneliness.”
The Prophet (peace be upon him) replied: “When you lie down to sleep, say: I seek refuge with the perfect words of Allah from His anger, His punishment, the evil of His servants, from the whispers of the devils, and from their presence. For it will not harm you, and indeed, it is more likely that it will not come near you.” (Imam Ahmed)
وروى مالك في الموطأ عن يحيى بن سعيد قال: بلغنِي أنَّ خالد بن الوليد قال لرسول الله صلى الله عليه وسلم: إنِّي أُروَّعُ في منامي، فقال له رسول الله صلى الله عليه وسلم:”قل: أَعُوذُ بِكَلِمَاتِ اللهِ التَّامَّةِ مِنْ غَضَبِهِ وَعِقَابِهِ، وَشَرِّ عِبَادِهِ، وَمِنْ هَمَزَاتِ الشَّيَاطِينِ وَأَنْ يَحْضُرُونِ”.
Yahya ibn Sa’id (may Allah be pleased with him) said:
“I was informed that Khalid ibn al-Walid (may Allah be pleased with him) said to the Messenger of Allah (peace be upon him), ‘I am frightened in my sleep.’
The Prophet (peace be upon him) replied: ‘Say: I seek refuge with the perfect words of Allah from His anger, His punishment, the evil of His servants, from the whispers of the devils, and from their presence.’ (Imam Malik)
What to do if you see a bad dream
عن أبي قتادة رضي الله عنه قال: سمعت رسول الله صلى الله عليه وسلم يقول: الرؤيا من الله، والحلم من الشيطان، فإذا رأى أحدكم شيئا يكرهه، فلينفث عن يساره ثلاث مرات، وليتعوذ بالله من شرها، فإنها لن تضره،
فقال: إن كنت لأرى الرؤيا أثقل من جبل، فما هو إلا أن سمعت بهذا الحديث فما أباليها. متفق عليه،
واللفظ لمسلم، وقال في آخره وزاد ابن رمح في رواية هذا الحديث: وليتحول عن جنبه الذي كان عليه.
Abu Qatada (may Allah be pleased with him) said:
I heard the Messenger of Allah (peace be upon him) say:
“The dream is from Allah, and the nightmare is from the devil. So if any of you sees something he dislikes, let him spit lightly to his left three times and seek refuge with Allah from its evil, for it will not harm him.”
He said: “I used to see dreams heavier than a mountain, but as soon as I heard this hadith, I paid no attention to them.” (Agreed upon; the wording is from Muslim).
وفي رواية لأحمد عن أبي قتادة رضي الله عنه عن رسول الله صلى الله عليه وسلم قال: الرؤيا من الله، والحلم من الشيطان فمن رأى رؤيا يكرهها، فلا يخبر بها وليتفل عن يساره ثلاثا، وليستعذ بالله من شرها فإنها لا تضره.
And in the narration of Ibn Rumh (may Allah be pleased with him), an addition was made:
“Let him turn to the other side he was not on.” (Imam Ahmad)
Abu Qatada (may Allah be pleased with him) also narrated that the Messenger of Allah (peace be upon him) said:
“The dream is from Allah, and the nightmare is from the devil. So if anyone sees a dream he dislikes, he should not tell anyone about it. Let him spit lightly to his left three times and seek refuge with Allah from its evil, for it will not harm him.”
قال الإمام النووي رحمه الله: فينبغي أن يجمع بين هذه الروايات ويعمل بها كلها.. فإذا رأى ما يكرهه نفث عن يساره ثلاثا قائلا: أعوذ بالله من الشيطان من شرها، وليتحول إلى جنبه الآخر، وليصل ركعتين، فيكون قد عمل بجميع الروايات، وإن اقتصر على بعضها أجزأه في دفع ضررها بإذن الله تعالى كما صرحت به الأحاديث.
Imam An-Nawawi (may Allah have mercy on him) said: “It is necessary to combine these narrations and act upon all of them. If one sees something he dislikes, let him spit to his left three times, say: ‘I seek refuge with Allah from the evil of it,’ and turn to the other side. He should also pray two rak’ahs. By doing this, he will have followed all the narrations. If he does some of them, it will suffice to protect him from harm, with the permission of Allah, as the hadiths have made clear.”
What to recite before going to sleep
From the Sunnah, we also have the following ayahs we should recite before going to sleep:
Ayat-ul-Kursi (Verse of the Throne)
اللَّهُ لَا إِلَٰهَ إِلَّا هُوَ الْحَيُّ الْقَيُّومُ ۚ لَا تَأْخُذُهُ سِنَةٌ وَلَا نَوْمٌ ۚ لَهُ مَا فِي السَّمَاوَاتِ وَمَا فِي الْأَرْضِ ۗ مَنْ ذَا الَّذِي يَشْفَعُ عِندَهُ إِلَّا بِإِذْنِهِ ۚ يَعْلَمُ مَا بَيْنَ أَيْدِيهِمْ وَمَا خَلْفَهُمْ وَلَا يُحِيطُونَ بِشَيْءٍ مِنْ عِلْمِهِ إِلَّا بِمَا شَاءَ ۚ وَسِعَ كُرْسِيُّهُ السَّمَاوَاتِ وَالْأَرْضَ ۚ وَلَا يَئُودُهُ حِفْظُهُمَا ۚ وَهُوَ الْعَلِيُّ الْعَظِيمُ.
Allāhu lā ilāha illā huwa al-ḥayyu al-qayyūm, lā ta’khudhuhu sinatun wa lā nawm, lahu mā fis-samāwāti wa mā fil-arḍ, man dhalladhī yashfa‘u ‘indahu illā bi-idhnih, ya‘lamu mā bayna aydīhim wa mā khalfahum, wa lā yuḥīṭūna bishay’in min ‘ilmihi illā bimā shā’, wasi‘a kursiyyuhu as-samāwāti wal-arḍ, wa lā ya’ūdhu ḥifẓuhumā, wa huwal-‘aliyyu al-‘aẓīm.
Allah! There is no deity except Him, the Ever-Living, the Sustainer of [all] existence. Neither drowsiness overtakes Him nor sleep. To Him belongs whatever is in the heavens and whatever is on the earth. Who is it that can intercede with Him except by His permission? He knows what is before them and what will be after them, and they encompass nothing of His knowledge except for what He wills. His Throne extends over the heavens and the earth, and their preservation tires Him not. And He is the Most High, the Most Great. (Surat al-Baqarah; 2:255)
The Prophet (peace be upon him) said:
“Whoever recites Ayat-ul-Kursi before sleeping, a guardian from Allah will protect him throughout the night.” (Bukhari)
Last two verses of Surat al-Baqarah
آمَنَ الرَّسُولُ بِمَا أُنزِلَ إِلَيْهِ مِنْ رَبِّهِ وَالْمُؤْمِنُونَ ۚ كُلٌّ آمَنَ بِاللَّهِ وَمَلَائِكَتِهِ وَكُتُبِهِ وَرُسُلِهِ لَا نُفَرِّقُ بَيْنَ أَحَدٍ مِنْ رُسُلِهِ ۚ وَقَالُوا سَمِعْنَا وَأَطَعْنَا ۖ غُفْرَانَكَ رَبَّنَا وَإِلَيْكَ الْمَصِيرُ
لَا يُكَلِّفُ ٱللَّهُ نَفۡسًا إِلَّا وُسۡعَهَاۚ لَهَا مَا كَسَبَتۡ وَعَلَيۡهَا مَا ٱكۡتَسَبَتۡۗ رَبَّنَا لَا تُؤَاخِذۡنَآ إِن نَّسِينَآ أَوۡ أَخۡطَأۡنَاۚ رَبَّنَا وَلَا تَحۡمِلۡ عَلَيۡنَآ إِصۡرٗا كَمَا حَمَلۡتَهُۥ عَلَى ٱلَّذِينَ مِن قَبۡلِنَاۚ رَبَّنَا وَلَا تُحَمِّلۡنَا مَا لَا طَاقَةَ لَنَا بِهِۦۖ وَٱعۡفُ عَنَّا وَٱغۡفِرۡ لَنَا وَٱرۡحَمۡنَآۚ أَنتَ مَوۡلَىٰنَا فَٱنصُرۡنَا عَلَى ٱلۡقَوۡمِ ٱلۡكَٰفِرِينَ
Āmanar-Rasūlu bimā unzila ilayhi min rabbihi wal-mu’minūn, kullun āmana billāhi wa malā’ikatihi wa kutubihi wa rusulih, lā nufarriqu bayna aḥadin min rusulih, wa qālū sami‘nā wa aṭa‘nā, ghufrānaka rabbanā wa ilaykal-maṣīr
Laa yukalliful-laahu nafsan illaa wus’ahaa; lahaa maa kasabat wa ‘alaihaa maktasabat; Rabbanaa laa tu’aakhiznaaa in naseenaaa aw akhtaanaa; Rabbanaa wa laa tahmil-‘alainaaa isran kamaa hamaltahoo ‘alal-lazeena min qablinaa; Rabbanaa wa laa tuhammilnaa maa laa taaqata lanaa bih; wa’fu ‘annaa waghfir lanaa warhamnaa; Anta mawlaanaa fansurnaa ‘alal qawmil kaafireen
The Messenger has believed in what was revealed to him from his Lord, and [so have] the believers. All of them have believed in Allah and His angels and His books and His messengers, [saying], “We make no distinction between any of His messengers.” And they say, “We hear and we obey. [Grant us] Your forgiveness, our Lord. To You is the [final] destination.”
Allah does not burden any human being with a responsibility heavier than he can bear. Everyone will enjoy the fruit of the good that one has earned and shall suffer for the evil that one has committed. (O Believers, pray like this to Allah: “Our Lord, take us not to task if we forget and lapse into error inadvertently. Lord! lay not on us the kind of burdens that You had lain on the people before us. Lord, lay not on us the kind of burden that we have not the strength to bear. Be kind to us, forgive us and show mercy to us. You are our Protector: help us against the disbelievers.” (Surat al-Baqarah; 2:285-286)
The Prophet (peace be upon him) said:
“Whoever recites the last two verses of Surat al-Baqarah at night, they will be sufficient for him.” (Bukhari and Muslim)
Surat Ikhlas
قُلْ هُوَ اللَّهُ أَحَدٌ
اللَّهُ الصَّمَدُ
لَمْ يَلِدْ وَلَمْ يُولَدْ
Qul huwal laahu ahad, Allah hus-samad
Lam yalid wa lam yoolad
Wa lam yakul-lahoo kufuwan ahad
Say, “He is Allah , [who is] One,
Allah , the Eternal Refuge.
He neither begets nor is born,
Nor is there to Him any equivalent.”
Surat al-Falaq
قُلْ أَعُوذُ بِرَبِّ الْفَلَقِ
مِنْ شَرِّ مَا خَلَقَ
وَمِنْ شَرِّ غَاسِقٍ إِذَا وَقَبَ
وَمِنْ شَرِّ النَّفَّاثَاتِ فِي الْعُقَدِ
وَمِنْ شَرِّ حَاسِدٍ إِذَا حَسَدَ
Qul a‘ūdhu birabbil-falaq
Min sharri mā khalaq
Wa min sharri ghāsiqin idhā waqab
Wa min sharri an-naffāthāti fil-‘uqad
Wa min sharri ḥāsidin idhā ḥasad
“Say: I seek refuge in the Lord of daybreak,
From the evil of what He created,
And from the evil of darkness when it settles,
And from the evil of those who blow on knots (practicing magic),
And from the evil of an envier when he envies.”
Surat al-Nas
قُلْ أَعُوذُ بِرَبِّ النَّاسِ
مَلِكِ النَّاسِ
إِلَٰهِ النَّاسِ
مِن شَرِّ الْوَسْوَاسِ الْخَنَّاسِ
الَّذِي يُوَسْوِسُ فِي صُدُورِ النَّاسِ
مِنَ الْجِنَّةِ وَالنَّاسِ
Qul aAAoothu bi rabbin nas
Maliki an nas
Ilahi an nas
Min sharril waswaasil khannas
Alladhee yuwaswisu fee sudoorin nass
Minal jinnati wannas
Say, “I seek refuge in the Lord of mankind,
The Sovereign of mankind.
The God of mankind,
From the evil of the retreating whisperer –
Who whispers [evil] into the breasts of mankind –
From among the jinn and mankind.
وَعَنْ عَائِشَةَ: أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَانَ إِذَا أَوَى إِلَى فِرَاشِهِ كُلَّ لَيْلَةٍ جَمَعَ كَفَّيْهِ ثُمَّ نَفَثَ فِيهِمَا فَقَرَأَ فيهمَا (قل هُوَ الله أحد) و (قل أعوذ بِرَبّ الفلق) و (قل أَعُوذُ بِرَبِّ النَّاسِ) ثُمَّ يَمْسَحُ بِهِمَا مَا اسْتَطَاعَ مِنْ جَسَدِهِ يَبْدَأُ بِهِمَا عَلَى رَأْسِهِ وَوَجْهِهِ وَمَا أَقْبَلَ مِنْ جَسَدِهِ يَفْعَلُ ذَلِكَ ثَلَاث مَرَّات ” متفق عليه.
Aisha (may Allah be pleased with her) said that every night when the Prophet (peace be upon him) went to his bed he joined his hands and breathed into them, reciting into them,
‘Say, He is God, One’; ‘Say, I seek refuge in the Lord of the dawn’; and ‘Say, I seek refuge in the Lord of men.’ Then he would wipe as much of his body as he could with his hands, beginning with his head, his face and the front of his body, doing that three times. (Bukhari and Muslim)
Duas before going to sleep
The Prophet (peace be upon him) used to recite this before sleeping.
اللَّهُمَّ بِاسْمِكَ أَمُوتُ وَأَحْيَا.
Allāhumma bismika amūtu wa aḥyā.
O Allah, in Your name, I die and I live.
اللَّهُمَّ إِنِّي أَسْلَمْتُ نَفْسِي إِلَيْكَ، وَوَجَّهْتُ وَجْهِي إِلَيْكَ، وَفَوَّضْتُ أَمْرِي إِلَيْكَ، وَأَلْجَأْتُ ظَهْرِي إِلَيْكَ، رَغْبَةً وَرَهْبَةً إِلَيْكَ، لَا مَلْجَأَ وَلَا مَنْجَى مِنْكَ إِلَّا إِلَيْكَ، آمَنْتُ بِكِتَابِكَ الَّذِي أَنْزَلْتَ، وَبِنَبِيِّكَ الَّذِي أَرْسَلْتَ.
Allāhumma innī aslamtu nafsī ilayk, wa wajjahtu wajhī ilayk, wa fawwaḍtu amrī ilayk, wa alja’tu ẓahrī ilayk, raghbatan wa rahbatan ilayk, lā malja’a wa lā manjā minka illā ilayk. Āmantu bikitābika alladhī anzalt, wa binabiyyika alladhī arsalt.
“O Allah, I have submitted myself to You, I have turned my face towards You, I have entrusted my affairs to You, and I have relied completely upon You, out of hope in You and fear of You. There is no refuge and no escape from You except to You. I believe in the Book You have revealed and in the Prophet You have sent.” (Bukhari and Muslim)
The Prophet (peace be upon him) said:
“Whoever recites this supplication before sleeping and dies that night, will die upon fitrah (a state of natural faith in Islam). So make it the last thing you say before sleeping.” (Bukhari and Muslim)
Shaykh Haytham Tamim 9th March 2025
List of prophetic daily adkhar
Duas for protection from harm and hasad
Top Tips for Boosting your Du’a
How to Receive the Light of Allah
The Importance of Dhikr – The Mindful Muslim
When Islam is like Oxygen in your Life
How can we use Fatiha to cure us?
The Du’as Allah is quick to answer
- The 13 quantities of the people of the lofty chambers of Paradise
- Are surrogacy and IVF permitted in Islam?
- Racism is never the answer to any problem
- Is it permissible to wear snakeskin in Islam?
- What is the difference between Islamic mortgages and conventional mortgages