As far as diet and exercise go, researchers from UCLA conducted an experiment. They found that (in mice) a high fat diet reduces the level of brain derived neurotrophic factors. These levels are a predictor of how well you will learn. However, exercise can counteract these effects.
Dehydration causes a range of neurological problems. Essentially, if you don't have enough water to cleanse your system, your body starts using amino acids. These amino acids would normally be used up building neurotransmitters, so, this can cause all sorts of problems, from what resembles ADHD, to depression, or even conditions that look like autoimmune disorders.