Terminal lucidity
Terminal lucidity is an unexpected return of mental clarity shortly before death in people who have previously been dull, confused, demented, or nonresponsive. The term was coined in 2009 by biologist Michael Nahm and psychiatrist Bruce Greyson.