Notice that even the fish is obedient to God, along with the pagans and the sea; basically everyone obeys God in this book except His prophet.
In chapter 2, Jonah prays. I think we should read this with a bit of skepticism, especially in light of his actions later on. That said, his full commitment and right submission to God in one breath and a total flip-flop with his actions in the next is something we’ve already seen in chapter 1 and is kind of the M.O. of most Christians so perhaps it’s not that far fetched.
Jonah prays from the belly of a giant fish. His situation is a desperate one as he starts to feel the weight of being chased down by God Himself. Although the “…belly of Sheol” is obviously figurative (since he wasn’t literally in the place of the dead), any situation without God sending a giant fish to give him refuge would have ended up there so it’s certainly a relevant perspective.
I do wonder if we’re supposed to get an image of those who were not Noah and his family from the “…and the flood surrounded me, all your waves and your billows passed over me” stuff. Jonah was thrown into an existing body of water, not a flash flood or something. He could be using the language to reflect the positioning of him not repenting and basically facing God’s consequences (although God’s patience and persistence are the prime aspects of this whole book.)
In fact, the back half of the prayer trades between a reminder of the circumstances Jonah has brought upon himself through rebellion and God’s patience within it. Jonah has hope that he will pray again, on dry land, towards the Temple (like a good Jewish boy.) Then back to the situation, which pictures nature surrounding him, almost attacking him, and being near death (that’s the “…land whose bars closed upon me forever”, which is again Sheol action.) Then the reminder that God brought him up from the pit (not literally, he was rescued from death by the fish/whale/creature.)
The temple image shows back up again, with God hearing the prayers of the man who was perishing in his own rebellion. (Ah hem, like the mariners. And the Ninevites. Will this lesson be lost on him? Yes, yes it will.) He brings in a reference to those who follow false idols as bad and his thanksgiving voice and sacrifice as good. This is ironic, of course, because the only folks who have sacrificed so far to God in the story are those who were likely vain idol-followers prior to this Jonah incident on their boat.
Regardless of whether Jonah lacks integrity here, his words about God are still true. Salvation does indeed belong to the Lord. And, as we will see again in a story of Jesus asking for a fish to spit something out, God talks to the fish and Jonah gets expelled onto dry land, hopefully to fulfill what God told him to do in the first place. Notice that even the fish is obedient to God, along with the pagans and the sea; basically everyone obeys God in this book except His prophet.