The Messenger of Allah ﷺ said, "Whoever wakes during the night and says upon waking, 'There is no god but Allah alone, with no partner. To Him belongs the dominion and to Him belongs all praise, and He has power over all things. Glory be to Allah, praise be to Allah, there is no god but Allah, Allah is the greatest, and there is no might nor power except with Allah,' then supplicates, 'Lord, forgive me'..."Walid said, "or he said, 'then makes a supplication,' it will be answered for him. And if he rises, performs ablution, then prays, his prayer will be accepted."
حدثنا عبد الرحمن بن إبراهيم الدمشقي حدثنا الوليد قال قال الأوزاعي حدثني عمير بن هانيء قال حدثني جنادة بن أبي أمية
قال رسول الله ﷺ من تعار من الليل فقال حين يستيقظ لا إله إلا الله وحده لا شريك له له الملك وله الحمد وهو على كل شيء قدير سبحان الله والحمد لله ولا إله إلا الله والله أكبر ولا حول ولا قوة إلا بالله ثم دعا رب اغفر لي قال الوليد أو قال دعا استجيب له فإن قام فتوضأ ثم صلى قبلت صلاته
Bukhari narrated it in the Book of Tahajjud, the chapter on the merit of one who wakes up during the night and prays, hadith no. 1154, from the hadith of Walid bin Muslim, through this same chain.