We were commanded to glorify Allah thirty-three times after every prayer, to praise Him thirty-three times, and to magnify Him thirty-four times. Then a man from the Ansar was visited in a dream and was asked, "Did the Messenger of Allah ﷺ command you to glorify Allah after every prayer in such-and-such a manner?"The Ansari replied in his dream, "Yes."The visitor said, "Make them twenty-five each, and include the declaration of Allah's oneness among them."When morning came, he went to the Prophet ﷺ and informed him of this. The Messenger of Allah ﷺ said, "Then do so."
حدثنا عثمان بن عمر أنا هشام عن محمد عن كثير بن أفلح
أمرنا أن نسبح في دبر كل صلاة ثلاثا وثلاثين ونحمد ثلاثا وثلاثين ونكبر أربعا وثلاثين فأتي رجل في المنام من الأنصار فقيل له أمركم رسول الله ﷺ أن تسبحوا في دبر كل صلاة كذا وكذا قال الأنصاري في منامه نعم قال فاجعلوها خمسا وعشرين خمسا وعشرين واجعلوا فيها التهليل فلما أصبح غدا على النبي ﷺ فأخبره فقال رسول الله ﷺ فافعلوا
Its isnad is sahih. Kathir bin Aflah Ansari has appeared frequently, and he is trustworthy. He is the freedman of Abu Ayub, and he is among the trustworthy senior successors. This hadith has appeared frequently without the wording "he commanded us," and the jurists have discussion around this issue, but they have unanimously interpreted it as not indicating an obligation.Tirmidhi narrated the hadith in this manner, 5/479, no. 3413, and graded it sahih, through the route of Hisham, from him. Nasai narrated something similar, 3/76, no. 1351, as did Darimi, 1/360, no. 1354.