Can coffee and naps go together? Now is a great time to test it out while you’re at home, and you might find a coffee nap is the perfect way to combat afternoon sluggishness and be energized for the remainder of the day.

Recent studies show that consuming a dose of caffeine equivalent to drinking about two cups of coffee, and laying down for a 15-20 minute nap helps boost energy levels and productivity after waking up.

So how do these two seemingly opposite factors combine to help you get an effective nap? When you feel tired, a chemical called adenosine circulates through your body in high amounts and promotes sleep; after you sleep adenosine levels start to drop. Sleep helps your body get rid of adenosine, so caffeine has to compete with less adenosine for the receptors in your brain.

A coffee nap is thought to boost energy levels by enhancing the effects of coffee by increasing your brain’s capacity to receive caffeine, which is why a coffee nap may increase energy levels more than just simply drinking coffee or sleeping.

Shane Davis, store manager at Amerisleep in Tucson, said drinking room temperature, lukewarm or iced coffee and laying down in a cool, dark room immediately afterward for a 15-20 minute nap will increase productivity and alertness after waking up.

“The cool thing is even though you may not necessarily fall asleep in those 15-20 minutes, you still get the benefits of that relaxation, it’s almost like a meditative state, and then the coffee kicks in,” Davis said.

“Basically what happens is you’re getting two effects: when you sleep your brain actually recovers and it starts taking away all those chemicals that make you tired (adenosine) and then after 20 minutes the caffeine kicks in to make you awake.”

“So in essence, caffeine connects to sensors in your brain, which then doesn’t allow the chemicals that tell you that you’re tired (adenosine) to connect to the brain, so it’s kind of fighting the battle for us to keep us awake and it takes time for the caffeine to make it all the way up into the brain sensors, that’s where it does its work.”

So why is 20 minutes the magic amount of time that is the most effective for a nap? Davis said it’s a combination of the effects of the caffeine and the stage of sleep in that amount of time.

“There’s two things that happen after about 20 minutes: one- the caffeine starts kicking in, so now it’s telling your body you’re not tired, it’s time to get up anyway; and then two: you don’t necessarily want to fall asleep and go past stage two of sleep; (stage 3 is the beginning of deep sleep) because if you do, then you wake up, you’re groggy… our whole idea is to do the light sleep, get those chemicals cleared out of your brain so that way the caffeine can kick in and do its job to make you the most productive after it.”

Studies have shown a good night sleep’s benefits include heart health, reduces stress and inflammation, increases alertness, improves memory and helps the body repair itself; napping has also been shown to improve memory, cognitive function, energy levels and mood.

“At Amerisleep we think of it not just as a mattress, we think of sleep as being a healthy lifestyle so there’s a lot to it, to how you’re going to be able to be productive throughout your day, to be healthy and having good sleep is part of that. Power naps have been proven to be very effective with people being more productive later on in the day,” Davis said.