Jonah 2:1 and paragraph summary
2:1 - Then Jonah prayed to the Lord his God from the stomach of the fish
The preceding verse must be taken into account when reading this verse. The three days and nights transpired before Jonah finally prayed to the LORD. Jonah's location for this prayer is the stomach of the fish. Jonah finally comes to his senses after all of the Lord's discipline.
Another thought is that after three days and nights, Jonah realized that God would not kill him. This might make more sense given the rest of the book. Jonah doesn't so much want to obey; he just doesn't want to spend any more time in the environment of the fish given that God would continue to sustain his life for an unknown amount of time.