Yes, indeed.
I've witnessed dementia patients take a fall, and then be dramatically more confused the next couple days. I've also seen them get some kind of social exposure, sunshine, exercise, etc. and present better for several days afterwards. Measuring "how well is the mind working" isn't like reading a digital meter.
re. sunlight, pharmacological immunomodulation via UV isomerization of a substance found on skin is… interesting imo: https://www.pnas.org/doi/10.1073/pnas.0603119103