[Machine] Khalid ibn al-Walid ibn al-Mughirah was a man who would experience fear in his sleep. He mentioned this to the Messenger of Allah ﷺ , and the Prophet ﷺ said to him, "When you lie down to sleep, say, 'In the name of Allah, I seek refuge in the perfect words of Allah from His anger, punishment, the evil of His slaves, and from the whispers of the devils and that they come close.'" So he said it, and that fear went away from him.
كَانَ خَالِدُ بْنُ الْوَلِيدِ بْنِ الْمُغِيرَةِ رَجُلًا يَفْزَعُ فِي مَنَامِهِ فَذَكَرَ ذَلِكَ لِرَسُولِ اللهِ ﷺ فَقَالَ لَهُ النَّبِيُّ ﷺ إِذَا اضْطَجَعْتَ فَقُلْ بِاسْمِ اللهِ أَعُوذُ بِكَلِمَاتِ اللهِ التَّامَّةِ مِنْ غَضَبِهِ وَعِقَابِهِ وَشَرِّ عِبَادِهِ وَمِنْ هَمَزَاتِ الشَّيَاطِينِ وَأَنْ يَحْضُرُونِ فَقَالَهَا فَذَهَبَ ذَلِكَ عَنْهُ