He might not have stayed for 3 days; Once Jonah found himself in the darkness, he repented from his disobedience and prayed to God to save him. His prayer was answered, and the whale lay him on the shore.
(87. And [mention, in the Book, Jonah:] the man of the whale, when he went [his way]...