Ibn Uyaynah (may Allah have mercy on him) said: I said to Ibn Tawus (may Allah have mercy on him): What did your father say when he heard the sound of thunder? He said: He used to say: 'Subhana man sabbahta lah' (Glory be to the One whom you have glorified).
Imam al-Shafi'i (may Allah have mercy on him) said: It is as if he was going by the words of Allah Almighty: "And the thunder glorifies with His praise" [Surah al-Ra'd: 13], that thunder glorifies Allah.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب صلاة الاستسقاء / 6472