It is narrated from Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) asked a man of the Ansar: "What do you say when you intend to sleep?" He said: I say: 'Bismika rabbi wada'tu janbi faghfir li dhanbi' (O my Lord, in Your name I have laid down my side (on the bed), so forgive me my sin). He (peace and blessings be upon him) said: "You have certainly been forgiven." Abu Ya'la al-Mawsili recorded it with these words: when the Messenger of Allah (peace and blessings be upon him) lay down to sleep, he would say: 'Bismika rabbi wada'tu janbi' (O my Lord, in Your name I have laid down my side). Likewise, Ahmad bin Hanbal recorded it in his Musnad, al-Tabarani in Kitab al-Du'a through the route of Ibn Wahb, and al-Nasa'i in his book 'Amal al-Yawm wal-Laylah through Abdullah bin Yazid.
Hadith Gradingمحدثین:سكت عنه البوصيري، إسناده ضعيف؛ لضعف عبد الرحمن بن زياد الأفريقي
Hadith Takhrij«عبد الرحمن بن زياد بن أنعم الأفريقي: ضعيف في حفظه (من الحفظ)» «(6095/1) أخرجه مصنف ابن أبي شيبة برقم: 12» «(6095/2) أخرجه مسند أحمد برقم: 6583، وأخرجه مجمع الزوائد ومنبع الفوائد برقم: 17043، 17045»