When someone complained of his insomnia, Rasulullah صلى الله عليه وسلم advised him to recite the following Dua,
اَللَّهُمَّ غَارَتِ النُّجُوْمُ، وَهَدَأَتِ الْعُيُوْنُ، وَأَنْتَ حَيٌّ قَيُّوْمٌ، يَا حَيُّ يَا قَيُّوْمُ، أَنِمْ عَيْنِي وَأَهْدِئْ لَيْلِي
O Allah ! The stars have faded, the eyes have been calmed, and you are the Ever Living, the Maintainer. O the Ever Living and the Maintainer do allow my eyes to sleep and make my night peaceful
(Mujamul Kabeer#4683)
عن زيد بن ثابت، رضي الله عنه، قال: أصابني أرق من الليل، فشكوت ذلك إلى رسول الله صلى الله عليه وسلم فقال: قل: اَللَّهُمَّ غَارَت النُّجُوْمُ، وَهَدَأَت الْعُيُوْنُ، وَأَنْتَ حَيٌّ قَيُّوْمٌ، يَا حَيُّ يَا قَيُّوْمُ، أَنِمْ عَيْنِي وَ أَهْدِی لَيْلِي فقلتها فذهب عني (المعجم الكبير للطبراني رقم4683)

