Zohar Shelach Lecha
He described the order of their burial. Men next to men, women next to women. Adam at the head, with Eve next to him. Sarah next to Eve, Abraham next to Sarah, Isaac next to Abraham, Rebecca next to Isaac. Leah next to Rebecca, and Jacob next to Leah. Adam was on one side, and Jacob on the other end.
In the book of King Solomon, there is a description of the burial arrangement in the Cave of the Machpelah. Adam and Eve were first, Sarah and Abraham next to them, Isaac and Rebbeca in a row with a different angle opposite them. Jacob and Lea in the middle. A woman next to a woman, a man next to a man. Adam and Eve, Sarah and Abraham, Jacob and Leah, Rebbeca and Isaac. Adam was on one side, Abraham and Isaac had Jacob in the middle because it is not proper to bury a son next to his father. That is why Jacob was in the middle.
Similar to the way they were buried so they will rise at the time of the Resurrection. Leah would rejoice inside the Cave with Mashiach, son of David that would be from her descendants. Rachel, who was buried outside Jerusalem on the way of Efrat, would rejoice with Mashiach, son of Joseph from her descendants.
From Zohar Chadash Ruth #212, 213) https://unityzohar.com/zohar-books/zh_ruth/211
The Zohar tells us that Adam hewed the cave next to the Garden of Eden. When Eve died, he brought her for burial and smelled the scents of the Garden of Eden. He tried to hew a greater space for the Cave, but a voice came from the heavens forbidding him from doing so. When Adam died, his son Seth buried him in the Cave.
Before Abraham discovered the cave, many desired the cave for burial, but angels protected the place with fire that blocked people from coming in until Abraham purchased the cave.
Souls of people with merits go to the Garden of Eden through the Cave of the Machpelah, after Adam examines the soul.