UNITED STATES, July 11, 2017 (New York Times by Sara Manning Peskin, MD): Every major organ in the body -- heart, lungs, liver, kidneys -- has the capacity to shut off the brain. It's a biological veto system. The mysterious exception is "terminal lucidity," a term coined by the biologist Michael Nahm in 2009 to describe the brief state of clarity and energy that sometimes precedes death. Alexander Batthyany, another contemporary expert on dying, calls it "the light before the end of the tunnel."
A 5-year-old boy in a coma for three weeks suddenly regains consciousness. He thanks his family for letting him go and tells them he'll be dying soon. The next day, he does.
Early reports of terminal lucidity date back to Hippocrates, Plutarch and Galen. Dr. Nahm collected 83 accounts of terminal lucidity written over 250 years, most of which were witnessed by medical professionals. Nearly 90 percent of cases happened within a week of death and almost half occurred on the final day of life.
More on this fascinating subject at "source" above--and note the valuable comments to the article.