Many elderly people simply do not drink enough water
I discovered this first hand when my 90 year old mother began living in an assisted living facility.
After approximately two weeks my mother's short term memory began to falter and to make matters worse she began hallucinating.
After a severe bout of diarrhea ( viral bug) she started seeing people in her room that simply were not there.
This really rattled me because prior to admittance into the assisted living facility she had full mental function.
Of course I do not blame anything on the assisted living facility.
It was the fact that she was not in her own environment. This consisted of steady stream of water encouraged by my younger brother.
Once we increased her water intake her mental capability significantly improved and the hallucinations stopped.