Sulaiman bin Buraidah narrated that his father said:
“Khalid bin Al-Walid al Makhzumi complained to the Prophet (ﷺ) saying: ‘O Messenger of Allah, I do not sleep at night due to insomnia.’ So Allah’s Prophet (ﷺ) said: ‘When you go to your bed, say: O Allah, Lord of the Seven Heavens and what they have shaded, Lord of the earths and what they carry, Lord of the Shayatin and those they have misguided, be for me a Protector against the evil of Your creation, all of them together, so that none of them should transgress against me, or oppress me, mighty is the one who seeks protection in You, and glorified is Your praise, and there is none worthy of worship other than You, and there is none worthy of worship except You. (Allāhumma rabbas-samāwātis-sab`i wa mā aẓallat, wa rabbal-arḍīna wa mā aqallat, wa rabbash-shayāṭīni wa mā aḍallat, kun lī jāran min sharri khalqika kullihim jamī`an an yafruṭa `alayya aḥadun minhum, aw an yabghiya `alayya, `azza jāruka wa jalla thanā’uka, wa lā ilāha ghairuka wa lā ilāha illā anta).”