“Then Jonah prayed.” The prayer Jonah prayed would have been very short because he would have quickly run out of oxygen and become unconscious and then died. It is not commonly known that Jonah died in the fish, but he did, and in that way was a “type” of Christ: Jonah was dead in the fish for three days and three nights and then was raised from the dead by God, and Jesus was dead in the “heart of the earth” for three days and three nights and then was raised by God. It is because Jonah 2:1 says Jonah prayed out of the fish’s belly that most Christians believe Jonah was alive inside the fish. But it would have likely taken Jonah at least a minute to pass out inside the fish, and it could have been longer, and during that time Jonah would have prayed. Christians who think that Jonah was alive in the fish for three days know that would have had to have been a miracle, but what would have been the point of that miracle? What would have been its parallel in the Bible or history? In contrast, Jonah being dead for three days and three nights makes him a perfect type of Christ, who died on the cross and arose three days and nights later. Jonah being alive or Jonah being dead then raised from the dead both required God to do a miracle for Jonah, but the miracle that best parallels the life of Christ is that Jonah was dead and then raised from the dead, and that also best fits what Jonah 2:2-9 says.
Jonah 2:2-9 is not the prayer that Jonah prayed from inside the huge fish. For one thing, in reading Jonah 2:2-9 it can be seen that some of what Jonah said could only have been said after Jonah was out of the fish and thus raised from the dead, not before then. For example, Jonah 2:2 says Jonah called and God heard his voice, but Jonah would have only known God heard him after he was out of the fish’s belly and alive on the shore; he would not have known that while still inside the fish. Also, the fact that Jonah had been thrown “into the depths” and “into the heart of the seas” is a record of him being thrown into the ocean, not a record of him being in the fish (Jonah 2:3). He thought he was going to die, a reasonable conclusion for one thrown off a ship into the ocean, yet he was confident of his resurrection (Jonah 2:3). In Jonah 2:5, Jonah is still remembering being in the ocean with the seaweed around him and the water up to his neck. But in Jonah 2:6 he is remembering being in the fish and blacking out, realized he had died, and then gave God praise for raising him from death, from the “pit” (“pit” is commonly used for the grave). In Jonah 2:7, Jonah records that it was as his life was ebbing away that he remember Yahweh and prayed a prayer, and he knew Yahweh heard him because Yahweh raised him from the dead.
[For more on Jonah being dead and the prayer he prayed, see commentary on Matthew 12:40].