“Three days and three nights” is a phrase we find a few times in the OT, and I would suggest that the usage here is more symbolic than literal.
We first see it used in 1 Kings 30:12. A member of an Egyptian raiding party was found in a field. He had been left by the raiding party for dead because he’d gotten sick. He had been without food or water for “three days and three nights.” After King David’s men revived him, the man led them to the raiding party where King David slew them all (except for 400 who escaped), and recovered all they had taken, including two of his wives.
There are a couple of themes here that jump out at me. The first is that he was virtually a dead man for three days and three nights, and that upon his revivification, he led Israel to victory over its enemy. The second is that of “fasting” for three days and three nights, in connection with sickness and death.
The next time we see this phrase is in Tobias 3:10. Tobias and Sara, separately, are under afflictions. Sara goes into an upper room and fasts for “three days and three nights” in sorrow. And on the third day, praying at the same time (though separately), Tobias and Sara pray to God in their sorrow and affliction for help. And after the prayer is said, the angel, Raphael, is sent to them to heal them.
The third time we see this phrase is in Esther 4:16. It has come to the attention of Mordochai that Aman has set plans to pay into the king’s coffers to destroy the Jews. So he sends word to Esther, the queen, to seek the king’s aid in protecting them. Esther replies that it is a well known rule that whoever goes in to the king’s inner court who is not called for will be put to death immediately, unless the king holds out a golden rod to show mercy, and that Esther has not been called. Mordecai begs her to risk her life for his whole people.
So Esther asks him, and all the Jews he can find, to fast for “three days and three nights” and then she will go in to the king’s inner court to speak to him. And after they did this, and she went in, the king held out the golden scepter to her and showed her mercy, saving her life.
And after some events, Esther makes her intercession on the part of the Jews clear, and the king has Aman put to death by hanging him on a gibbet.
Again, we have fasting for three days and three nights under the shadow of death, after which life is “restored” (by the mercy of the king), and then the Jews are saved from their enemy by the king.
And finally we have the story of Jonas, in Jonas 2:1. Jonas is disobeys the Lord’s command to go into Nineve to preach against their wickedness, and tries to flee across the sea. While on the ship, he falls asleep and a great storm rises on the sea, and the crew come to him to seek his help (another Jesus image). He tells them that the storm is from God’s wrath, and if they desire to save themselves, they should cast him into the sea as a sin offering.
They do this, and the storm immediately calms. Then Jonas is swallowed by a whale, and is in its belly for “three days and three nights.” Note here that submersion into water, or the sea, is a death symbol and a presage to baptism. During his time in the belly of the whale, Jonas repents and begs God to restore him. After this, the whale spews him onto dry ground (symbolizing resurrection).
Jonas then goes forth into Nineve to preach, where he brings salvation to the city by their conversion from sin.
Jesus reference of the Jonas story, and the use of the phrase “three days and three nights” may, then, be understood as a typology referring to death, new life, and salvation. He doesn’t need to literally be dead for three full days.