Reference : Hisn al-Muslim 102

بِاسْمِكَ رَبِّي وَضَعْتُ جَنْبِي،
وَبِكَ أَرْفَعُهُ،
فَإِن أَمْسَكْتَ نَفْسِي فارْحَمْهَا،
وَإِنْ أَرْسَلْتَهَا فَاحْفَظْهَا
بِمَا تَحْفَظُ بِهِ عِبَادَكَ الصَّالِحِينَ
Bismika Rabbī waḍa`tu janbī, 
wa bika arfa`uh, 
fa in amsakta nafsī farḥamhā, 
wa in arsaltahā faḥfaẓhā 
bimā taḥfaẓu bihi `ibādakaṣ-ṣāliḥīn.


With Your Name1 my Lord, I lay myself down;
and with Your Name I rise. 
And if You take my soul, have mercy on it,
and if You send it back then 
protect it as You protect Your righteous slaves.2

Reference:
1 "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. . . ".
2 Al-Bukhari 1 1/ 126 and Muslim 4/2084.

Chapter: Before sleeping