We tend to consider the link between caffeine and stress as a negative one: Picture chugging coffee during a stressful all-nighter. But numerous studies show that caffeine can significantly reduce the effects of chronic stress, and new research explains how.

Scientists examined how caffeinated and non-caffeinated mice responded to stressful situations and found that rodents whose drinking water was laced with caffeine exhibited far fewer symptoms of depression and anxiety than did caffeine-free ones. Plus, their memory was better. Researchers then used blood and brain tests to explore why. The verdict: Caffeine blocks brain receptors for a chemical called adenosine, and those same receptors regulate mood and memory. Therefore, inhibiting the receptors negates depression and other symptoms of repeated stress.

Although the experiment was performed on mice, researchers expect that future studies will confirm the same phenomenon in humans. In the meantime, next time life throws you a curve ball, feel free to fight back with a cup of joe.