Ghrelin is a hormone released by the gut when the absence of food is sensed. It is known to act on the hypothalamus in endocrine and metabolic regulation. Horvath's laboratory reports that making mice 'biochemically hungry' with ghrelin injections improves their performance in maze and other intelligence tests. From their abstract: "circulating ghrelin enters the hippocampus and binds to neurons of the hippocampal formation, where it promotes dendritic spine synapse formation and generation of long-term potentiation. These ghrelin-induced synaptic changes are paralleled by enhanced spatial learning and memory."
This suggests that a great way to prepare for an examination or demanding performance might be, according to Christopher Shea in the NYTimes comment on this work, "Go in mildly hungry, not carbo-loaded for endurance, and snack to maintain that edgy state. Such advice, applied on a national scale, might help save our schools. Since overweight kids have suppressed ghrelin levels, Horvath theorizes that perhaps the obesity epidemic has contributed to declining test scores and other American educational woes."