Dementia is a bug in the program. The program is powerful, and the bug is a small change that makes it powerfully wrong.
It is amazing that someone could drink that much water, without a restroom bream or just not feeling thirsty anymore. But I can imagine overdrinking over a course of days in response to feeling dryness, and not realizing that she is overdoing it.
I can't imagine how hard it would to control be if she was taking painkillers on an as-needed basis for a long time. People with dementia are often surprisingly clever and resourceful, considering the disease.