This excerpt is taken from Sheikh Abu Hamza Abdul Khaliq Siddiqi's book Sahi Fazail-e-Amaal.
عن البراء بن عازب قال: كان رسول الله صلى الله عليه وسلم إذا أوى إلى فراشه نام على شقه الأيمن، ثم قال: اللهم أسلمت نفسي إليك ، ووجهت وجهي إليك ، وفوضت أمري إليك ، وألجأت ظهري إليك ، رغبة ورهبة إليك ، لا ملجأ ولا منجا منك إلا إليك ، آمنت بكتابك الذى أنزلت ، ونبيك الذى أرسلت . وقال رسول الله صلى الله عليه وسلم : من قالهن ثم مات تحت ليلته مات على الفطرة .
It is narrated from Sayyiduna Bara bin Azib (may Allah be pleased with him) that when the Messenger of Allah (peace and blessings be upon him) would settle on his bed, he would sleep on his right side and then recite this supplication: "O Allah! I entrust my soul to You, and I turn my face towards You, and I hand over my affairs to You, and I lay my back towards You with love, desire, and fear, and there is no refuge or escape from You except to You. I believe in Your Book which You have revealed and in Your Prophet whom You have sent."
Reference: Sahih Bukhari, Book of Supplications, Chapter: Sleeping on the Right Side, Hadith No: 6315.
Virtue:
The Messenger of Allah (peace and blessings be upon him) said: "Whoever recites these words and then sleeps, if he dies that night, he will die upon the natural disposition (Islam)."