Sounds like an Edgar Allan Poe short story.
That’s what I thought. He had a fear of being buried alive.