How about hydration? Anecdotally if I am low on water, electrolytes, or protein, I lose my deepest levels of reasoning.
https://well.blogs.nytimes.com/2016/05/25/a-low-salt-diet-ma...
It may even be that most of the purported negative effects of a high sodium diet are caused by this.
https://www.nih.gov/news-events/nih-research-matters/sodium/...
https://www.health.harvard.edu/heart-health/sodiumpotassium-...
Here's a cautionary tale:
https://www.reddit.com/r/keto/comments/6hhzxh/morton_lite_sa...