Section 2 Mishkat al-Masabih 2240

Arabic hadith text
وَعَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنْ سَرَّهُ أَنْ يَسْتَجِيبَ اللَّهُ لَهُ عِنْدَ الشَّدَائِدِ فَلْيُكْثِرِ الدُّعَاءَ فِي الرَّخَاءِ» . رَوَاهُ التِّرْمِذِيُّ وَقَالَ: هَذَا حَدِيث غَرِيب
Translation

Abu Huraira reported God’s messenger as saying, “If anyone finds pleasure in receiving an answer from God in times of difficulty, he should make many supplications when times are easy.” Tirmidhi transmitted it, saying this is a gharib tradition.