The Prophet ﷺ said, "Whoever wakes during the night and says, 'There is no god but Allah alone, with no partner. To Him belongs the dominion, to Him belongs all praise, and He has power over all things. Praise be to Allah, glory be to Allah, there is no god but Allah, Allah is the greatest, and there is no might nor power except through Allah,' then says, 'O Allah, forgive me,' or makes any supplication, it will be answered. And if he performs ablution and prays, his prayer will be accepted."
عن النبي ﷺ قال: من تعار من الليل فقال: لا إله إلا الله وحده لا شريك له له الملك وله الحمد وهو على كل شيء قدير، الحمد لله، وسبحان الله، ولا إله إلا الله والله أكبر، ولا حول ولا قوة إلا بالله، ثم قال: اللهم اغفر لي أو دعا استجيب له فإن توضأ وصلى قبلت صلاته.
Bukhari reported it in the chapter on tahajjud (1154), from Sadaqa bin Fadl, who said, Walid informed us, from Uzai, who said, Umayr bin Hani told me, who said, Junada bin Abu Umaya told me, Ubada bin Samit told me, and he related it.His saying, "taara" – taara means turning over on the bed at night along with speech, though most say taara means waking up. Fath al-Bari (3/40).And his saying, "If he performs wudu, his prayer is accepted" is clarified by the report of Tirmidhi (3414), "If he resolves and performs wudu, then prays, his prayer is accepted."