I'm afraid the arrow of causality works the other way round, see here:  The conclusion in previous studies that obesity impairs cognitive function stems from improper interpretation of a negative association between intelligence and obesity from cross-sectional studies. Results from the analyses of high-quality, population-based, prospectively longitudinal data firmly establish that low intelligence increases the chances of obesity.