"إِذَا فزعَ أحدُكُم في النَّوم فليقلْ: باسْم الله أعوذُ بكلماتِ الله التَّامة مِنْ غضبِه وشرِّ عقابه وشرِّ عبِاده، ومِنْ همزاتِ الشَّياطين وأنْ يحضرون؛ فإِنها لنْ تَضُرَّه".
“When one of you becomes frightened during sleep, then let him say: ‘I seek refuge in Allah’s Perfect Words from His anger, His punishment, and the evil of His creatures, from the whisperings of the Shayatin, and that they should come (Aʿūdhu bikalimātillāhit-tāmmati min ghaḍabihī wa ʿiqābihī wa sharri ʿibādih, wa min hamazātish-shayāṭīni wa an yaḥḍurūn).’ For verily, they shall not harm him.” He said: “So ʿAbdullah bin ʿAmr used to teach it to those of his children who attained maturity, and those of them who did not, he would write it on a sheet and then hang it around his neck.”
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ إِذَا فَزِعَ أَحَدُكُمْ فِي النَّوْمِ فَلْيَقُلْ أَعُوذُ بِكَلِمَاتِ اللَّهِ التَّامَّةِ مِنْ غَضَبِهِ وَعِقَابِهِ وَشَرِّ عِبَادِهِ وَمِنْ هَمَزَاتِ الشَّيَاطِينِ وَأَنْ يَحْضُرُونِ فَإِنَّهَا لَنْ تَضُرَّهُ قَالَ وَكَانَ عَبْدُ اللَّهِ بْنُ عَمْرٍو يُلَقِّنُهَا مَنْ بَلَغَ مِنْ وَلَدِهِ وَمَنْ لَمْ يَبْلُغْ مِنْهُمْ كَتَبَهَا فِي صَكٍّ ثُمَّ عَلَّقَهَا فِي عُنُقِهِ
Yahya related to me from Malik that Yahya ibn Said said that he had heard that Khalid ibn al-Walid said to the Messenger of Allah ﷺ "I have nightmares." The Messenger of Allah ﷺ said to him, "Say, 'I seek refuge with the complete words of Allah from His anger and His punishment and the evil of His slaves, and from the evil suggestions of the shayatin and from their being present (at death).' " Audhu bi kalimati' llahi't-tammati min ghadabihi wa iqabihi wa sharri ibadihi wa min hamazati' sh-shayatin wa an yahdurun.
قَالَ لِرَسُولِ اللَّهِ ﷺ إِنِّي أُرَوَّعُ فِي مَنَامِي فَقَالَ لَهُ رَسُولُ اللَّهِ ﷺ قُلْ أَعُوذُ بِكَلِمَاتِ اللَّهِ التَّامَّةِ مِنْ غَضَبِهِ وَعِقَابِهِ وَشَرِّ عِبَادِهِ وَمِنْ هَمَزَاتِ الشَّيَاطِينِ وَأَنْ يَحْضُرُونِ
[Machine] The Messenger of Allah ﷺ used to teach us words to say before sleeping out of fear, "In the name of Allah, I seek refuge in the complete words of Allah from His anger and punishment, from the evil of His slaves, from the whispers of the devils, and that they come near."
كَانَ رَسُولُ اللهِ ﷺ يُعَلِّمُنَا كَلِمَاتٍ يَقُولُهَا عِنْدَ النَّوْمِ مِنَ الْفَزَعِ «بِاسْمِ اللهِ أَعُوذُ بِكَلِمَاتِ اللهِ التَّامَّاتِ مِنْ غَضَبِهِ وَعِقَابِهِ وَمِنْ شَرِّ عِبَادِهِ وَمِنْ هَمَزَاتِ الشَّيَاطِينِ وَأَنْ يَحْضُرُونِ»
"إذا أخذت مضجعك فقل: أعوذ بكلمات الله التَّامَّة من غضبه وعقابيه، وشرَّ عباده، ومن هَمزات الشياطين أن يحضرون، فإنه لا يضُرُّك، وبالحرِيِّ ألا يَضُرَّك".
"إِذَا اضطجعت فقلْ: بسم الله، أعوذُ بكلمةِ اللهِ التَّامَّةِ منْ غَضَبِه وعِقَابه ومنْ شرِّ عبادِه ومِنْ همزاتِ الشياطينِ وأنْ يحضرون" .