Fussilat - 41:51

وَإِذَا أَنْعَمْنَا عَلَى الْإِنسَانِ أَعْرَضَ وَنَأى بِجَانِبِهِ وَإِذَا مَسَّهُ الشَّرُّ فَذُو دُعَاء عَرِيضٍ
[41:51]
And when We show favor to man, he turns aside and withdraws himself; and when evil touches him, he makes lengthy supplications.
When We bestow favours on man, he turns away, and gets himself remote on his side (instead of coming to Us); and when evil seizes him, (he comes) full of prolonged prayer!
When We show favour unto man, he withdraweth and turneth aside, but when ill toucheth him then he aboundeth in prayer.