كتاب الذكر والدعاء والتوبة والاستغفار
48  
The Book Pertaining to the Remembrance of Allah, Supplication, Repentance and Seeking Forgiveness
(17)
Chapter: Supplication When Going To Sleep
(17)
باب مَا يَقُولُ عِنْدَ النَّوْمِ وَأَخْذِ الْمَضْجَعِ
Sahih Muslim 2714 b

This hadith has been narrated on the authority of Ubaidullah b. Umar with the same chain of transmitters and he said:

Then utter:" My Lord. with Thine name I place my side and if Thou keepest me alive have mercy upon myself"
وَحَدَّثَنَا أَبُو كُرَيْبٍ، حَدَّثَنَا عَبْدَةُ، عَنْ عُبَيْدِ اللَّهِ بْنِ عُمَرَ، بِهَذَا الإِسْنَادِ وَقَالَ ‏ "‏ ثُمَّ لْيَقُلْ بِاسْمِكَ رَبِّي وَضَعْتُ جَنْبِي فَإِنْ أَحْيَيْتَ نَفْسِي فَارْحَمْهَا ‏"‏ ‏.‏
Reference : Sahih Muslim 2714b
In-book reference : Book 48, Hadith 86
USC-MSA web (English) reference : Book 35, Hadith 6555
  (deprecated numbering scheme)