Some science behind the scenes
Terminal lucidity
Terminal lucidity refers to an unexpected return of mental clarity and memory that occurs in the time shortly before death in patients suffering from severe psychiatric and neurologic disorder. This phenomenon has been noted in patients with schizophrenia, tumors, strokes, meningitis, and Alzheimer's disease. It may be present even in cases of patients with previous mental disability.
One of the most important conclusions from all the case histories that now exist, is that the brain is not the mind, and that the mind can largely operate independently of the brain
There are two subtypes: one that comes gradually (a week before death), and another that comes rapidly (hours before death). The former occurs in the majority of cases. There may be plenty of cases reported in literature but the term terminal lucidity just became available for search in 2009.
Observations
For iPad/iPhone users: tap letter twice to get list of items.