This is a praying, asking or supplicating God Most Gracious and All-Forgiving.

It is better that you read this prayer before you die and after your death.

It may also be read before you sleep, because the sleeping is like the dead, and he may sleep and will not awake again:

"My God, be kind to me with Your kindness; and include me in your mercy; and offer to me a place in Your paradise.

My God, avoid me the evil of the evil genies, and the deceit of the devil; You are the Generous and Gracious.

My God, answer my prayer, and let Your angels be my companions, but let not the devils be my masters and patrons.

My God, You are my Master and Patron in the life of the World and in the Next Life: Take my soul [to You, and let me die] while I am a Muslim [: submitting myself to God alone], and join me with the righteous.

God, I have just departed from the life of the World, and to Your neighborhood I have come; I have [like a beggar] knocked Your door; so be Kind to me with Your mercy, and offer to me out of Your generosity, and protect me from Your wrath.

My Lord, I ask Your protection from the devils annoying, and I ask Your protection from attending and serving them.

My Lord, grant me my wishes, and let Paradise be my home; and Your mercy: let it be my provision and entertainment (or hospitality.)

God, You are more Merciful than all the merciful.
"


Son of Adam, don't be stubborn, but yield to your Lord Most Gracious and All-Forgiving; so when you are about to die, supplicate your Lord with such prayer and humble yourself before Him, or else you will be enslaved by the devils in the Afterlife.

http://www.quran-ayat.com/man/1.htm#Instructions_