When the Prophet ﷺ rose at night to perform tahajjud, he would say, "O Allah, to You belongs all praise. You are the Light of the heavens and the earth and all who are within them. To You belongs all praise. You are the Sustainer of the heavens and the earth and all who are within them. To You belongs all praise. You are the Sovereign of the heavens and the earth and all who are within them. To You belongs all praise. You are the Truth, Your promise is truth, Paradise is truth, the Fire is truth, the Hour is truth, the Prophets are truth, and Muhammad is truth. To You I have submitted, in You I have placed my trust, and in You I have believed."Then Qutayba mentioned a phrase whose meaning is, "For Your sake I have disputed, and to You I have brought judgment. So forgive me for what I have done before and what I will do later, what I have done in secret and what I have done openly. You are the One who brings forward and the One who puts back. There is no god but You, and there is no power and no strength except through Allah."
أخبرنا قتيبة بن سعيد قال حدثنا سفيان عن الأحول يعني سليمان بن أبي مسلم عن طاوس
كان النبي ﷺ إذا قام من الليل يتهجد قال اللهم لك الحمد أنت نور السموات والأرض ومن فيهن ولك الحمد أنت قيام السموات والأرض ومن فيهن ولك الحمد أنت ملك السموات والأرض ومن فيهن ولك الحمد أنت حق ووعدك حق والجنة حق والنار حق والساعة حق والنبيون حق ومحمد حق لك أسلمت وعليك توكلت وبك آمنت ثم ذكر قتيبة كلمة معناها وبك خاصمت وإليك حاكمت اغفر لي ما قدمت وما أخرت وما أعلنت أنت المقدم وأنت المؤخر لا إله إلا أنت ولا حول ولا قوة إلا بالله
It was narrated by Muslim in "Prayer of the Traveler," chapter on the Prophet's prayer and supplication at night, hadith 769, from Qutayba, and by Bukhari in "Tahajjud," chapter on tahajjud at night, hadith 1120, through the hadith of Sufyan bin Uyayna with the same chain. It is also found in Kubra, hadith 1319.