Sahih Muslim Book 35, Hadith Number 6549.
Chapter : Supplication at the time of sleeping and going to bed.
Al-Bara’ reported that whenever Allah’s Messenger (may peace be upon him) went to bed, he said: “O Allah, it is with Thine Name that I live and it is with Thine Name that I die.” And when he got up he used to say: “Praise is due to Allah, Who gave us life after our death (sleep) and unto Thee is resurrection.”