The Talmud (Yerushalami) does contain the story of Rabbi Shimon Ben Yochais miraculous survival in the cave with his son during the Roman occupation.
https://ascentofsafed.com/cgi-bin/ascent.cgi?Name=lag-rebbe-dr2 II. Cave Lessons
Whale World
Rabbi Shimon and his son Elazer sought refuge from the Roman authorities in a cave near the town of Pekein. For thirteen years they remained cloistered inside, not daring to exit. How did Rabbi Shimon observe the mitzvahs? Matzah obviously wasn't available. In what manner was he able to fulfill the commandment of its consumption while holed up in the cave?
Torah regards a person as inculpable if he is forced to violate or not perform mitzvahs. And the Talmud says, "G-d exonerates him." Nevertheless, "He is not considered as though he actually observed the mitzvah." Lacking the performance of the mitzvah, the individual still bears this deficiency. Can this be said of Rabbi Shimon?
Chassidus responds that he did fulfill all of the commandments while in the cave, but in a spiritual manner. The physical fulfillment of mitzvahs causes Divine Light to shine in the world. Rabbi Shimon's spiritual performance of the commandments accomplished a similar feat.
That's why his soul was in the category called Leviatan. This Hebrew word for "giant sea denizen" intimates the Future Era. It is derived from the same three-letter root as the word for "connect." When Leah conceived Levy she said, "This time my husband will be joined to me" (Genesis 29:34). And through the Divine service of "whale" souls, all of the spiritual and physical worlds are joined to the Infinite Light. This aspect of connection alludes to the supernal unity between the seferahs of Wisdom (Chochmah) and Understanding (Binah) in the highest spiritual World of Emanation (Atzilus). There, an unprecedented light descends from G-d's Infinite Light.
Bound in an everlasting union, this unification represents the ultimate revelation. For present within their bond is G-d's Infinite Light. Called "Delight," its revelation is reserved for the Future Era. Rabbi Shimon, though, had already attained its level through his personal Divine service. Bereft of self-identity, he gave himself into G-d's Infinite Light. And just as a whale traverses great distances with a single swish of his tail fin, so too "whale" souls attain wondrous spiritual heights. That's why during his cave sojourn, Rabbi Shimon's spiritual fulfillment of the commandments sufficed. He was already in a position similar to the World to Come.
Miracle Foods
A question, though, persists. Why didn't Rabbi Shimon perform the mitzvahs with miraculously supplied physical objects? Surely G-d could have provided him with a succah and matzahs in a supernatural way . And there is precedent for such Divine assistance. Elijah the prophet was kept alive for forty days by G-d's grace. As the verse informs, "He went in the strength of that meal for forty days and forty nights" (The First Book of Kings 19:8).
What's more, Elijah had experienced miracles before. G-d had instructed him to hide in a riverbed. G-d promised that ravens would bring him food. And they did. "Ravens brought him bread and meat in the morning and evening" (The First Book of Kings 17:4-6). The Talmud remarks that a miracle within a miracle transpired. For the ravens brought Elijah kosher bread from his friend, Ahab.
Moreover, Rabbi Shimon and his son themselves ate and drank inside the cave thanks to a miracle! The Talmud relates how a fruit-bearing carob tree and spring suddenly appeared inside the cave. Even today, the spring and carob tree can be seen in the town of Pekein. Hence the question is reinforced: why didn't G-d perform additional miracles and furnish a succah and matzahs? Then Rabbi Shimon could have performed the commandments in a physical rather than spiritual manner.