When God Teaches Us A Lesson
Jonah 2:9 (ESV) … “But I with the voice of thanksgiving will sacrifice to you; what I have vowed I will pay. Salvation belongs to the Lord!”
It is only when Jonah is treading the very doorstep to death that he finally turns to the Lord. No one could be a more fitting candidate as patron saint of people who leave things to the last minute. In his own words, it is from the belly of Sheol that he cries out to the Lord. Even though his anguish and plight have been self-inflicted, the Lord hears him and answers his prayer.
His prayer in the water is answered instantaneously, but the dark night of despair inside the fish drags on and on before God’s reply is received. Nonetheless the Lord had a purpose in prolonging Jonah’s stay in the fish. And so, at the right time, he is violently thrown up on the beach.
The words of Jonah’s prayer in chapter 2 seem to be very eloquently expressed. But the reality may have been somewhat different. More probably they were gasped in brief snatches of barely-conscious awareness of where he was and what was happening. Only upon his ultimate escape from the horrors of this chapter does he reflect on it all. And then, in a calmer moment, he commits his prayers, cries and emotions to writing.
As Jonah reflects back and gives us the lesson he has learned thus far. He also states his resolve with regard to the future. It is a pivotal moment in his experience. It is the point at which the Lord speaks to the fish and gets it to release its distressed victim. It is as though the Lord has been waiting to hear these words from his servant. Now that it has arrived, there is no need to detain Jonah further—he’s ready for the next stage. And so, since this is the lesson the Lord has been at such pains to teach Jonah, and since it was such a hard-fought lesson to teach, it would pay us well to consider it carefully. 
 Mackrell, P. (2007). Opening up Jonah (pp. 59–60). Leominster: Day One Publications.