Sahih Bukhari Volume 008, Book 075, Hadith Number 327.
Narated By Al-Bara' bin 'Azib : When Allah's Apostle went to bed, he used to sleep on his right side and then say, "All-ahumma aslamtu nafsi ilaika, wa wajjahtu wajhi ilaika, wa fauwadtu Amri ilaika, wa alja'tu zahri ilaika, raghbatan wa rahbatan ilaika. La Malja'a wa la manja minka illa ilaika. Amantu bikitabika al-ladhi anzalta wa nabiyyika al-ladhi arsalta! Allah's Apostle said, "Whoever recites these words (before going to bed) and dies the same night, he will die on the Islamic religion (as a Muslim)."