Please note that this story is repeated another date due to a discrepancy in the Yartzeit Date
RABBI AKIVA'S PASSING ON EREV YOM KIPPUR YALKUT SHIMONI
It once happened that Rabbi Akiva was imprisoned in jail, and Rabbi Yehoshua the Garsi, his disciple, was attending to him. On Erev Yom Kippur, the latter departed and went home. Eliyahu arrived and stood at the entrance to the house. Rabbi Yehoshua said: "Shalom Aleichem Rebbi," and Eliyahu replied "Shalom Aleichem Rebbi uMori - Peace be upon you my master and teacher!" Rabbi Yehoshua asked Eliyahu "Is there anything you need?" Eliyahu replied "I am a Kohen and I have come to tell you that Rabbi Akiva has died in prison." Immediately they both went and found the gate of the jail cell wide open and the one in charge - the jailkeeper was fast asleep and also all the people they too were all sleeping, they lay Rabbi Akiva on a bed and carried him out with them. Eliyahu Zachur LaTov carried him on his shoulders and attended to him. When Rabbi Yehoshua haGarsi saw this he said to Eliyahu, "My Rabbi and teacher didn't you say to me that you are a Kohen, who is forbidden from defiling himself with tumah and impurity of the dead?" Eliyahu replied, "Suffice it to say that: There is no tumah or impurity from the righteous tzaddikim nor from their disciples!" They carried him all night long until they reached a manor house in Caesarea. When they arrived they ascended three steps and went down inclines until a cavern opened up before them and there they saw a chair, a table and a lantern. They laid down Rabbi Akiva placing him on the bed and took their leave. When they left the cave they sealed it and the lamp lit up with light. When Eliyahu saw this he opened up and said, "Happy are the righteous and Fortunate are those that toil in Torah, happy are those that fear Hashem - a hidden place in Gan Eden is reserved for you in the future world to come, fortunate are you Rabbi Akiva, that you should find a resting place prepared for you at your time of death, that is why it says 'she even prepared her table,'"
Source is Yalkut Shimoni on Nach #944:2-3
ד"א מעשה היה ברבי עקיבא שהיה חבוש בבית האסורים ור' יהושע הגרסי היה תלמידו ומשמשו, ערב יום הכפורים נפשטר ממנו והלך לביתו, בא אליהו ז"ל ועמד על פתח ביתו אמר ליה שלום עליך רבי אמר ליה שלום עליך רבי ומרי, אמר ליה כלום אתה צריך אמר לו ומי אתה, אמר ליה כהן אני ובאתי להגיד לך שרבי עקיבא מת בבית האסורים, מיד הלכו שניהם לבית האסורין ומצאו פתח שער בית האסורין פתוח ושר בית הסוהר היה ישן וכל האסורים היו ישנים והשכיבו את ר' עקיבא על המטה ויצאו, מיד נטפל אליהו ז"ל ונטלו על כתפיו, וכשראה רבי יהושע כך א"ל לאליהו ז"ל רבי והלא אמש אמרת לי שכהן היית וכהן אסור לטמא במת, אמר לו דייך ר' יהושע בני חס ושלום שאין טומאה בתלמידי חכמים ואף בתלמידיהם, והיו מוליכים אותו כל הלילה עד שהגיעו לאנטיפרס של קוצרין, כיון שהגיעו לשם עלו שלש מעלות וירדו שלש מעלות ונפתח המערה לפניהם וראו שם כסא וספסל ושלחן ומנורה, והשכיבו את ר' עקיבא על המטה ויצאו, וכיון שיצאו נסתמה המערה ודלקה הנר על מנורה, וכשראה אליהו כך פתח ואמר אשריכם צדיקים ואשריכם עמלי תורה ואשריכם יראי אלקים שגנוז וטמון לכם ומשומר לכם מקום בגן עדן .לעתיד לבא, אשריך רבי עקיבא שנמצא לך מלון ערב בשעת מיתתך, לכך נאמר אף ערכה שלחנה ילקוט שמעוני על נ"ך תתקמ״ד:ב