In the nineteenth century many had a fear of being buried alive. There were reports of people being in a near-death state and being pronounced dead by hack doctors of the day. Atlas Obscura published a nice article about some of the contraptions invented so people could alert those above ground that they were still alive in their coffin.
Of course Edgar Allan Poe, being . . . well . . . Edgar Allan Poe, could not resist playing on these fears. In 1844 he wrote "The Premature Burial" in the Philadelphia Dollar Newspaper. Enjoy!