"Whenever the waves, like giant shadows, engulf them, they pray to God in all sincerity and devotion. But no sooner does He bring them safe to land, some of them hold back their belief. None will deny our revelations except the treacherous and the ungrateful."
Human beings are overwhelmed by God's grace and generosity. We live off the earth He has created; we breathe the air He has made available; we eat the nutritious food He has provided. Many, of course, forget all this and behave towards God as if He does not exist at all. Nevertheless, these very people would run to God in times of hardship, but as soon as they are out of danger, they revert to their disgraceful attitudes.
Gratitude is a sign of common sense and an honourable nature. When God praised Noah, He described him as "a thankful servant" (al-Isra: 3), and He praised Abraham as "grateful for his Lord's favours." (al-Naml: 121).
When Prophet Muhammad was asked why he devoted so much time to prayer and dedication to God, he replied: "Should I not be grateful servant of my Lord?" We must be made aware of these facts and exhorted not to abuse the favours God has bestowed upon us.
"Thematic Commentary on The Quran" - Muhammad Al-Ghazali, pp. 504, 505