It is narrated from Ali (a.s.) that he said: Fatima (s.a.) complained to the Messenger of Allah (s.a.w.a.) about insomnia. He told her: Recite the following my child:
يَا مُشْبِعَ الْبُطُوْنِ الْجَائِعَةِ، وَ يَا كَاسِيَ الْجُسُوْمِ الْعَارِيَةِ وَ يَا سَاكِنَ الْعُرُوْقِ الضَّارِبَةِ، وَ يَا مُنَوِّمَ الْعُيُوْنِ السَّاهِرَةِ، سَكِّنْ عُرُوْقِيَ الضَّارِبَةِ، وَ اْذَنْ لِعَيْنِيْ نَوْمًا عَاجِلًا.
yaa mushbe-a’l botoonil jaa-e-a’te, wa yaa kaaseyal josoomil a’areyate wa yaa saakenal o’rooqiz zaarebate, wa yaa monawwemal o’yoonis saaherate, sakkin o’rooqeyaz zaarebate, waa zan le-a’ynee nawman a’ajelan.
O One, Who fills the empty stomachs and One, Who covers the naked bodies, O One, Who steadies the throbbing veins. O One, Who puts to sleep, the wakeful eyes. Make my throbbing veins steady and allow sleep for my eyes soon.
Lady Fatima (sa) supplication while going to bed -Sahifa Fatima (sa)
additionally, Imam Jaa'far Saadiq (A.S.) said that when you have difficulty in falling asleep, recite this Duaa:
Sub'haanallaahi Zish-Shaani Daa'imis-Sultwaani Kulla Yawmin Huwa Fish-Shaan.
اَلْحَمْدُ لِلهِ الْكَافِيْ
Al-hamdu lillaahil-kaafee,
All praise is for that God, Who is sufficient
سُبْحَانَ اللهِ الْاَعْلٰى
subhaanal-laahil-a'laa,
and Who is pure and untainted is the God, Who is lofty and great.
حَسْبِيَ اللهُ وَ كَفٰى
hasbiyal-laahu wa kafaa,
Allah is sufficient for me
مَا شَاءَ اللهُ قَضٰى
maa shaa'al-laahu qadaa,
and He does whatever He likes.
سَمِعَ اللهُ لِمَنْ دَعَا
sami'al-laahu liman da'aa,
He harkens to the supplication of every supplicant.
لَيْسَ مِنَ اللهِ مَلْجَاٌ
laysa minal-laahi malja',
There is no refuge other than Allah,
وَ لَا وَرَاءَ اللهِ مُلْتَجَاٌ
wa laa waraa'al-laahi multaja'.
and there is no protection other than Him.
تَوَكَّلْتُ عَلَى اللهِ رَبِّيْ وَ رَبِّكُمْ
Tawakkaltu 'alal-laahi rabbee wa rabbikum,
I rely upon Allah, Who is my Lord and your Lord
مَا مِنْ دَابَّةٍ اِلَّا هُوَ آخِذٌ بِنَاصِيَتِهَا
maa min daabbatin illaa huwa aakhidhun bi-naasiyatihaa,
and everything that moves on the surface of the earth is within His control.
اِنَّ رَبِّيْ عَلٰى صِرَاطٍ مُسْتَقِيْمٍ
inna rabbee 'alaa siraatim-mustaqeem.
Indeed, the path of My Lord is the straight path.
اَلْحَمْدُ لِلهِ الَّذِيْ لَمْ يَتَّخِذْ وَلَدًا
Al-hamdu lillaahil-ladhee lam yattakhidh waladaa,
All praise is for that God, who did not deem anyone as His son
وَ لَمْ يَكُنْ لَهُ شَرِيْكٌ فِيْ الْمُلْكِ
wa lam yakun lahoo shareekun fil-mulk,
nor is there any partner in His kingdom
وَ لَمْ يَكُنْ لَهُ وَلِيٌّ مِنَ الذُّلِّ
wa lam yakun lahoo waliyyum-minadh-dhull,
or a support in His weakness.
وَ كَبِّرْهُ تَكْبِيْرًا
wa kabbirhu takbeeraa.
And it is incumbent on everyone to confess to His greatness.
اَعُوْذُ بِمَا عَاذَتْ بِهٖ مَلَائِكَةُ اللهِ الْمُقَرَّبُوْنَ، وَ اَنْبِيَاءُ اللهِ الْمُرْسَلُوْنَ، وَ عِبَادُهُ اللهِ الصَّالِحُونَ، مِنْ شَرِّ رُؤْيَايَ الَّتِيْ رَاَيْتُ: اَنْ تَضُرَّنِيْ فِيْ دِيْنِيْ وَ دُنْيَايَ.
a-o’ozo bemaa a’azat behi malaa-ekatul laahil moqarraboona, wa anbeyaa-ul laahil mursaloona, wa e’baadul laahis saalehoona, min sharre roayaayal latee ra-ayto: an tazurranee fee deenee wa dunyaaya.
I seek refuge of the one, whose refuge is sought by the proximate angels, prophets, messengers, and the righteous from the mischief of the dreams that I see: that prove harmful in the world and the hereafter.
اَلْحَمْدُ لِلّٰهِ، اللَّهُمَّ اِنِّى اُشْهِدُكَ فَاشْهِدُكَ فَاشْهَدُوا يَا مَنْ حَضَرَنى اَنَّهُمَا قَدْ آذَيَانى فِى حَيَاتِى وَ عِنْدَ مَوْتِى-
Al-hamdu lillaah, allaahumma innee ushhiduka fash-had, wa ash-hidoo yaa man hadaranee annahumaa qad aadhayaanee fee hayaatee wa 'inda mawtee.
Praise be to Allah. O Allah, I call You to witness, so bear witness; and bear witness, O you who are present with me, that the two of them have indeed hurt me during my life and at my death.
Text, translation and recitation from Duas.org