The Messenger of Allah ﷺ used to say frequently, "Glory be to Allah and praise be to Him, I seek Allah's forgiveness and turn to Him in repentance."She said, I asked, "Messenger of Allah, I see you saying often, 'Glory be to Allah and praise be to Him, I seek Allah's forgiveness and turn to Him in repentance.'"He replied, "My Lord informed me that I would see a sign appear in my nation, and when I saw it, I should say frequently, 'Glory be to Allah and praise be to Him, I seek Allah's forgiveness and turn to Him in repentance.' And indeed I have seen it. 'When the help of Allah and the conquest comes' [Nasr 110:1], that is the conquest of Mecca, 'and you see people entering the religion of Allah in crowds' [Nasr 110:2], 'then glorify the praise of your Lord and seek His forgiveness. Indeed, He is ever Accepting of repentance' [Nasr 110:3]."
كان رسول الله ﷺ يكثر من قول: سبحان الله وبحمده أستغفر الله وأتوب إليه قالت: فقلت: يا رسول الله أراك تكثر من قول: سبحان الله وبحمده أستغفر الله وأتوب إليه؟ فقال: خبرني ربي أني سأرى علامة في أمتي فإذا رأيتها أكثرت من قول سبحان الله وبحمده أستغفر الله وأتوب إليه فقد رأيتها {إذا جاء نصر الله والفتح} فتح مكة {ورأيت الناس يدخلون في دين الله أفواجا} {فسبح بحمد ربك واستغفره إنه كان تواب}
Muslim reported it in the Book of Prayer (484:220), from Muhammad bin Muthanna, who said, "Abdul-Ala narrated to me, Dawud narrated to us, from Amir, from Masruq, from Ayesha," and he related it. It is mentioned in abbreviated form in the Sahihayn, in the section on the supplications of ruku and sujud.