There is a reason many cultures hold a wake before a funeral. It actually dates back to before we had sophisticated medical equipment that can tell if someone is actually dead or not.

The wake was traditionally a period of mourning as it still is today, but it also used to be a waiting period to ensure a person was not buried alive. Yes, getting accidentally buried alive did happen sometimes, and apparently still does happen in Brazil.
A woman who was declared dead at a hospital was buried the next day, but 11 days later screams were heard coming from her tomb. Locals quickly smashed the tomb apart and when they opened the casket, the woman’s body was still warm.

Rosangela Almeida dos Santos, 37, was rushed to Hospital do Oeste in Barreiras, Brazil on January 28th after suffering from severe fatigue. She then suffered two cardiac arrests and, according to her death certificate, died from septic shock. She was buried the next day.
Santos had previously suffered from fainting spells since childhood and took anti-convulsive medication.

Santos was only waked on the evening of the day she had died and was then laid to rest in a local cemetery in her hometown of Riachao das Neves. But on February 9th, which is 11 days after Santos was buried, locals began hearing noises coming from her tomb.