Ever get hungry and find you’re suddenly on a short fuse? That’s because the brain’s levels of serotonin—a hormone that helps regulate behavior and anger—fluctuate when people are stressed out or famished, according to researchers from the University of Cambridge’s Behavioural and Clinical Neuroscience Institute.

“We’ve known for decades that serotonin plays a key role in aggression,” says Molly Crockett, a Cambridge study author. “But it’s only very recently that we’ve had the technology to look into the brain and examine just how serotonin helps us regulate our emotional impulses.”

To keep serotonin levels stable and your mood mellow, dietitians suggest eating foods rich in complex carbs, such as oatmeal, whole grains, fruits and veggies and beans. These foods actually help trigger the release of serotonin. What’s more, avocados—a good source of monounsaturated fats—keep brain receptors sensitive to the feel-good hormone. Also, eating more foods rich in omega-3 fatty acids, such as fatty fish, flaxseeds and walnuts, may help stave off depression. And chocolate can spark a release of serotonin and endorphins—brain chemicals that relieve stress and prompt feelings of euphoria.

Feeling better now?