There is a Gemara somewhere that says there were 3 sages that went out to sea. Their boat broke apart.Thankfully there was an island nearby. They went to that island. It was very cold one night. They lit a fire to stay warm. The island started shaking. They then realized they were really on the back of a whale. The whale threw them into the water. Thankfully just then a ship came by and picked them up. Where is this Gemara
There is a gemora Babba basra 73b that is similar to what you are describing, but it wasn’t with three sages, but only with Raba bar bar Chana. He once saw what he thought was an island with grass growing on it, and it was really a fish that has earth on it’s back with grass growing from the earth. He went on to it, and made a fire there, and when the fish got hot it turned over, and had they not have a boat nearby, they would have drowned.