Ever laid down for a quick 45-minute nap, only to wake up hours later wondering what day it is? Your body feels heavy, your brain is fuzzy, and you’re feeling anything but refreshed.

We’re always hearing that naps are a great way to recharge — so what gives?

It’s all about how you nap.

It’s true that naps are generally good for you when done right (more on that in a second), but when you sleep too long or too late, they can cause trouble.

One big culprit? Sleep inertia.

“Sleep inertia is when the brain wants to keep sleeping and complete a full sleep cycle,” says Cynthia Bodkin, MD, Sleep Medicine Physician at IU Health. “How strong the sleep inertia is depends on how sleep-deprived one is.” Genetics can also make a difference in how hard you’re hit by sleep inertia.

Another issue for most people who grapple from grogginess is that they sleep longer than they should.

“The ideal length for napping typically is about 20 minutes,” says Alison Kole, MD, Director of Outpatient Sleep Services at Summit Medical Group. “Longer naps tend to leave people sleepier, in part because the further you go into a sleep cycle the more likely you are to hit deep sleep.”

If you just can’t shake the grogginess, try these tips to fine-tune your napping skills and start waking up refreshed and ready to go!

Many sleep experts recommend keeping your nap to just 20 minutes, though some suggest that a half hour is okay too.

“The idea about the so-called ‘power nap’ is to keep the sleep time down to about 20 to 30 minutes,” says Peter Fotinakes, MD, medical director of the Sleep Disorders Center at St. Joseph Hospital. “The shorter sleep period makes it less likely that we enter deep sleep during the nap.”

Once you hit that deep sleep phase, you’re going to have a harder time waking up.

Hate to break it to you, but your midday snooze isn’t going to make up for anything if you only got four hours of sleep the night before. If anything, you’ll just have a harder time falling asleep when it’s time for bed, which will keep your sleep deprivation cycle going even longer.

“Too long of a nap will decrease sleep drive — sleep drive meaning that the longer you are awake during the day, the more likely you are to want to fall asleep at the end of the day,” Kole explains. “Basically, too much sleep during the day makes it harder to fall asleep at night.”

That mid-afternoon slump you feel most days is totally normal — and it’s also the most optimal time for a refreshing nap, especially compared to evening naps which can just sabotage our sleep schedule.

“We all enter a natural down period after lunch for about an hour when we should be taking a nap,” Fotinakes says. “We don’t [take afternoon naps] in our culture, but it is common in other countries and maybe a healthier way of living.”

That’s right: you hereby have permission to take a regular siesta. “All in all, naps can be a healthy part of your life, but shorter naps in the afternoon may be the best approach.”

Naps are one of the finer joys in life, so maybe you’ve never even considered whether you actually need to take one in the first place. If you lay down for a short snooze and can’t seem to fall asleep, you don’t need the doze in the first place.

“If you are not sleep deprived, then you would not need a nap,” Bodkin says. “If you can’t fall asleep in twenty minutes, you do not need the nap.”

If you’ve tried it all and just can’t seem to wake up from naps without feeling groggy, it might not be your thing. Some people just don’t mesh well with napping.

“Napping may not be good for everyone,” Kole says. “For some, any nap may result in difficulty with sleeping at night. Some may find that napping makes them more tired when they wake up… there are individual differences.”

We don’t know why this happens, but it’s a reality. “Research suggests there may be differences in body temperature and sensitivity to non-circadian rhythm influences.”

So, ready for your siesta? Kick back, set that alarm, and doze — but not for too long!

Claire Hannum is a NYC-based writer, editor, and traveler.