Wa `alaykum as-Salamu wa Rahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
If sleep deprivation is due to physical causes, it should be diagnosed and treated by referring to the professionals in the field. At the same time, one should complement such a treatment with spiritual healing, which is achieved by turning to Allah, the Creator of sleep, for assistance.
In his response to the question you posed, Sheikh Ahmad Kutty, a senior lecturer and an Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
The Prophet (peace and blessings be upon him) advised us all to go to bed in a state of purity and to read the last three Surahs or chapters of the Qur’an (i.e. 112, 113, 114), followed by du`aa of sleep.
However, if there is abnormal case of sleep deprivation or insomnia, the Prophet (peace and blessings be upon him) further taught us certain other supplications to read: We find two reports in the sources which are relevant and are of benefit for those who suffer from this condition:
1-In a report by Ibn Al-Sunni on the authority of Zayd Ibn Thabit, that he said, “I complained to the Prophet of my inability to sleep; then he told me to read these words:
“Allaahumma ghaarat al-nnujum, wa hada’at al-`uyun wa anta hayyun qayyoom, laa ta’khudhuka sinatun wa laa nawm; ihdi laylee wa ‘anim `aynee.
O Allah, stars have set, eyes have rested, You alone are the Ever-Alive, and the Self-Subsisting Source of all beings; neither slumber nor sleep overtakes You. Make my night comforting for me, and bring sleep unto my eyes.”
Zayd (may Allah be pleased with him) said, ‘When I said these words, I was cured of my condition.’
2-It is reported by both At-Tabarani and Ibn Shaybah on the authority of Khalid Ibn Al-Walid that he said: “I was suffering from insomnia and when I reported it to the Prophet (peace and blessings be upon him) he asked me, “Shall I teach you certain words which if you were to recite you would sleep better? Then he said: Say:
Allaahumma rabba al-ssamaawaati al-ssab’ wa maa azalaat wa rabba al-aradheena wa maa aqallat, wa rabba al-shayaateeni wa maa adallat, kun lee jaaran min sharri khalqika ajma’eena an yafruta ‘alayya ahadun minhum aw an yatghaa, ‘azza jaaruka, wa tabaaraka ismuka.
O Allah, O You who are the Lord of the seven heavens and whatever they shelter, and the earths and whatever they contain, and You who are the Lord of devils and whomsoever they mislead, You be my Guardian-Protector against the evils of all of Your creatures; guard me against their intrusions and invasions. Noble is the one who enjoys Your protection and Glorified is Your Name.”
The reporter commends, “Accordingly, Khalid said these words, and then he slept well.”
Allah Almighty knows best.