The Prophet ﷺ passed by her while she was in the mosque making supplication, then passed by her again around midday and said to her, "Are you still in the same state?"She replied, "Yes."He said, "Shall I teach you some words to say? Glory be to Allah equal to the number of His creation, glory be to Allah equal to the number of His creation, glory be to Allah equal to the number of His creation. Glory be to Allah to the extent that pleases Him, glory be to Allah to the extent that pleases Him, glory be to Allah to the extent that pleases Him. Glory be to Allah equal to the weight of His Throne, glory be to Allah equal to the weight of His Throne, glory be to Allah equal to the weight of His Throne. Glory be to Allah equal to the ink of His words, glory be to Allah equal to the ink of His words, glory be to Allah equal to the ink of His words."
أخبرنا محمد بن بشار قال حدثنا محمد قال حدثنا شعبة عن محمد بن عبد الرحمن مولى آل طلحة قال سمعت كريبا عن ابن عباس
أن النبي ﷺ مر عليها وهي في المسجد تدعو ثم مر بها قريبا من نصف النهار فقال لها ما زلت على حالك قالت نعم قال ألا أعلمك يعني كلمات تقولينهن سبحان الله عدد خلقه سبحان الله عدد خلقه سبحان الله عدد خلقه سبحان الله رضا نفسه سبحان الله رضا نفسه سبحان الله رضا نفسه سبحان الله زنة عرشه سبحان الله زنة عرشه سبحان الله زنة عرشه سبحان الله مداد كلماته سبحان الله مداد كلماته سبحان الله مداد كلماته
Muslim narrated it in the Book of Remembrance and Supplication, Chapter on Glorifying Allah at the Start of the Day and Before Sleep, no. 2726, from the hadith of Muhammad bin Abdul-Rahman, through him, and it is also in Al-Kubra, no. 1275.