More like cup ‘o joy: Not only is consuming coffee crazy-healthy for you, but it also boosts your brain power when combined with a nap.

Though coffee is a stimulant, thus capable of disrupting sleep, Vox reported it has reverse effects when immediately followed by a 20-minute nap. In fact, this process — known as a coffee nap — helps to maximize caffeine and increase alertness.

When caffeine eventually makes its way to the brain, it competes to fit into receptors normally filled with adenosine, the brain molecule that makes us feel drowsy. Vox reported adenosine is “a byproduct of brain activity, and when it accumulates at high enough levels, it plugs into these receptors and makes you feel tired.”

Caffeine can only block some of these adenosine receptors. And since sleeping naturally clears adenosine, napping for 20 minutes right after a cup of coffee can greatly reduce those drowsy molecules in time before the caffeine even kicks in. Vox cited a few supporting studies, two published in the journal Psychophysiology and another in the journal Clinical Neurophysiology. The findings of each study respectively found that those who take coffee naps commit fewer errors and have better memory than those who didn't.

Coffee naps are exactly how they sound: Sip on hot coffee and immediately take a nap. A half-asleep stage will suffice too, Vox said. Just be sure not to oversleep. Anything longer than 20 minutes is a gateway to deep sleep, making it harder to wake up and reap these benefits.

A nap isn’t the only way you can maximize that jolt of java. A 2006 study found coffee methods matter. Researchers considered the coffee grounds to water volume ratio, the volume of coffee prepared, home versus in-store grinding, and filtered versus boiled coffee. The results showed a larger volume of coffee increases the time the grounds come in contact with hot water, which allows for more caffeine to be extracted.

Men’s Health reported drinking coffee within 30 minutes of a meeting (or right after) can help you to retain more information.

And in terms of how much caffeine you consume a day, the 2-to-3-cup habit may no longer cut it. New York Magazine reported drinking multiple, small amounts all day long (2 ounces per hour) is a better idea. Those who did were more alert and sleeping sounder than most.