It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that when the Prophet (peace and blessings be upon him) would hear the thunder and lightning, he would supplicate «اللَّهُمَّلَاتَقْتُلْنَابِغَضَبِكَوَلَاتُهْلِكْنَابِعَذَابِكَوَعَافِنَاقَبْلَذَلِكَ»: "O Allah! Do not destroy us with Your wrath, do not end us with Your punishment, and grant us safety before that."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 5763
Hadith Gradingحکم دارالسلام:إسناده ضعيف لضعف حجاج، ولجهالة حال أبي مطر.