‘Ubada b. as-Samit reported God’s Messenger as saying, “If anyone is disturbed [from sleep] during the night and says, ‘There is no god but God alone who has no partner; to Him belongs the kingdom, to Him praise is due, and He is omnipotent; glory be to God; praise be to God; there is no god but God:
God is most great; there is no might and no power but in God,’ then says, ‘My Lord, forgive me’ (or he said, Then makes supplication), he will receive an answer; and if he performs ablution and prays, his prayer will be accepted.”
Bukhari transmitted it.