Hisnul Muslim 102

Before sleeping

بِاسْمِكَ رَبِّي وَضَعْتُ جَنْبِي، وَبِكَ أَرْفَعُهُ، فَإِنْ أَمْسَكْتَ نَفْسِي فَارْحَمْهَا، وَإِنْ أَرْسَلْتَهَا فَاحْفَظْهَا، بِمَا تَحْفَظُ بِهِ عِبَادَكَ الصَّالِحِينَ

Bismika Rabbee wadha'tu janbee , wa bika 'arfa'uhu, fa'in 'amsakta nafsee farhamhaa, wa 'in 'arsaltahaa fahfadhhaa, bimaa tahfadhu bihi 'ibaadakas-saaliheen.

With Your Name my Lord, I lay myself down and with Your Name I rise. And if my soul You take, have mercy on it, and if You send it back then protect it as You protect Your righteous slaves.(If any of you rises from his bed and later returns to it, let him dust off his bed with his waist garment three times and mention the Name of Allah, for he does not know what may have entered the bed after him, and when he lies down he should say: بِسْمِ اللَّهِ