Neuroscientists have recorded the activity of a dying human brain and discovered rhythmic brain wave patterns around the time of death that are similar to those occurring during dreaming, memory recall, and meditation. Now, a study published to Frontiers brings new insight into a possible organizational role of the brain during death and suggests an explanation for vivid life recall in near-death experiences.
I can certainly see this as evolutionarily beneficial. When you’re on the verge of dying and you suddenly have a recall of a lot of your experiences in life it may lead to you being able to survive.