I recently read an article in Time magazine that explain how there is an inverse relation between a person's weight and brainpower.
A study was made on 150 overweight people. The study showed that those who lost weight saw improvement on their test scores. While the scores of those who did not lose weight at all saw no progress.
The explanation behind this study/theory is that obesity affects a number of metabolic pathways including those that keep brain cells nourished with oxygen and other nutrients.
Therefore we can say that a healthy weight is good for both body and mind.