You go to bed at a reasonable time, log a solid eight hours under the covers—but still drag yourself out of bed in a bleary-eyed fog.

What gives?

While you nailed getting the recommended amount of time in bed, your problem might be a matter of sleep efficiency.

Your sleep efficiency score helps you recognize if the time you're spending in bed is actually restful—or, if you're just logging a lot of time awake under the covers.

“Simply put, sleep efficiency is a percentage of how much time you spend in your bed asleep,” Dr. Sanam Hafeez, Psy.D., a neuropsychologist, tells Shine. “If you spend eight hours laying in bed, but you were only sleeping for 6 of those hours, your sleep efficiency would be 75%.”

Hafeez says a sleep efficiency score above 85% or 90% is considered healthy—when coupled with getting the recommended seven to nine hours of sleep each night, that is.

For example: Say you stumble into bed at midnight, zonk out the second your head hits the pillow, and only wake up to your alarm at 6am—chances are, you’re still going to be sleep-deprived. “A person with a sleep efficiency of almost 100% may not be getting enough sleep due to not allowing enough time spent in bed after a long day,” Hafeez says.

But paying attention to both your hours in bed and your sleep efficiency score can help you be more informed and successful in your quest for rest—especially if you're struggling. “Individuals who struggle with insomnia or oversleeping should observe how much time they spend in bed versus time spent asleep to enhance the quality and depth of sleep,” she says.

Paying attention to both your hours in bed and your sleep efficiency score can help you be more informed and successful in your quest for rest—especially if you're struggling.

How to Find Your Sleep Efficiency Score

Tonight, note the time you hop into bed. You can do this mentally (if you think you'll remember!) or on a notepad next to your bed.

If you have trouble drifting off, try and note how long you're awake for. If you get up in the middle of the night and don’t fall back asleep—make another note. (Try not to stress about the time spent awake, since nerves can prevent drifting off.)

The next morning: Tally up any time you spent physically in bed, subtract any time asleep, then divide the smaller number by the larger number to get your sleep efficiency score.

If it’s lower than 85% without a good reason (say, some catch-up pillow talk with your partner) it may be time to take a look at your sleep habits.

Here are some of the biggest culprits that might be hurting your sleep efficiency score:

1. Lay Off the Afternoon Coffee

A 4 p.m. cold brew may help you power through the end of the workday, but it won’t do you any favors come bedtime.

“Nicotine and caffeine are known to cause insomnia, so it is best to avoid these substances to improve the quality of your sleep,” Hafeez says. “They tend to keep our brains in a state of alertness in a period when you should be trying to relax before bed.”

Even though you may not feel perked-up, caffeine can hang around in the system for six hours—long enough to keep you staring at the ceiling when it's time to go to bed.

2. Nix In-Bed Distractions

Reading in bed is good for you—right? Not so fast.

“Any (in-bed) activities—such as reading, watching TV, or using your phone—trains your brain to associate your time in bed as a time to lay awake,” Hafeez says. “This is where sleep efficiency starts to go down because you might be spending two hours laying awake rather than getting to sleep.”

Instead of reading in bed, she suggests, grab a book and park it on the couch. If scrolling through your IG feed helps take your mind off anxious thoughts, try a quick pre-sleep meditation instead (the Shine app is full of them!).

You don’t have to cut out a beloved bedtime ritual, but rather shift it to something a little more sleep-friendly—or, take it out of your bed.

3. Say Goodbye to the Nightlight

Your neighbor’s porch lights, the rattle of the subway outside your window, the glow of your charging computer—it can all impact your sleep efficiency.

“Before going to sleep, make sure any noises or lights that would keep you awake are eliminated,” Hafeez says. “This creates a peaceful, quiet, and dark environment for you to get a deep sleep...If you are sensitive to light, trying installing blackout curtains or wearing a sleep mask.”

4. Can’t Sleep? Get Out of Bed

“A person should only be laying in bed for 15 to 20 minutes before falling asleep,” Hafeez says.

Why: As the minutes pass, the pressure can build and make it less likely that you’ll drift off to dreamland.

Instead of logging hours counting sheep in bed, hop out from under the covers for a change of environment. You might read a chapter of a book on the couch, sip a mug of hot water, or even just walk around to tire yourself out a bit.

“Once you start to feel sleepiness coming, go back to bed,” Hafeez says. “This reiterates the behavior of associating the bed only as a time for sleeping.”

Read next: 3 Ways to Optimize Your Sleep)

Need some help falling asleep? Try a Nightcap—a sleepy retelling of your favorite '90s movies. They're just fun enough you'll want to listen and just boring enough you'll doze right off—and they're now available in the Shine iOS and Android app. Here's a sneak peek: