When we talk about getting a good night’s sleep, we’re usually referring to banking eight hours. But a true night of restorative sleep is just as much about quality as it is quantity, and a lot of us aren’t getting it. Research has found that although Americans are sleeping an average of seven hours and 36 minutes a night, 35 percent of those people rate their sleep quality as “only fair” or “poor”.

But before we talk about how to get better quality sleep, we need to understand what that means. Sleep quality is defined by the National Sleep Foundation as “tiredness upon waking and throughout the day, feeling rested and restored upon waking, and the number of awakenings experienced in the night.” The NSF stresses that there are four key determinants of sleep quality: sleeping at least 85 percent of the total time you’re in bed, falling asleep in 30 minutes or less, waking up no more than once per night, and being awake for 20 minutes or less after initially falling asleep. That’s a tall order for many of us, but not impossible. Here’s what works:

Nap smart
Naps are great for reducing fatigue and improving alertness, mood, performance, and memory — as long as you don’t nap too close to your real bedtime. A 20-minute nap will boost alertness and improve mood, but don’t go much longer; 30 to 60 minutes will put you in the deeper stages of sleep, leaving you feeling groggier and less well-rested than pre-nap.

Work out
Though exercising in the evening can make it harder to fall asleep, your morning spin class or afternoon yoga practice will actually improve sleep quality. Research has found that people who exercise during the day fall asleep faster and feel more rested in the morning. The physical activity may reset the sleep wake cycle “by raising body temperature slightly, then allowing it to drop and trigger sleepiness a few hours later,” the National Sleep Foundation explains. And you don’t need a full-on gym session to get the benefits — just 10 minutes of exercise a day (especially if done regularly) can dramatically improve the quality of your sleep.

Check your bedroom

The right sleep environment is crucial for a disruption-free night of rest. That means a bedroom that’s between 60 and 67 degrees Fahrenheit, no light, and no bothersome noises — think your partner’s snoring or sleeping with the TV on. Blackout curtains and ear plugs can help with the latter two.

Schedule your sleep
It’s tempting to stay up later and sleep in on the weekends, but an inconsistent schedule can mess with your sleep quality. Try to go to bed and wake up at the same time every day — your body clock (aka your circadian rhythm) will get used to the schedule, which will help you fall asleep more easily and stay asleep throughout the night.

Less sugar, more fiber
Research shows that a diet that’s high in fiber and low in added sugar can help you fall asleep faster. Protein that’s rich in B vitamins (like fish, poultry, meat, eggs, and dairy) is great too; studies have shown that it can regulate your levels of melatonin, the hormone that keeps your sleep cycle in check.

Put away your phone
The blue light from your computer, tablet, and cell phone can suppress melatonin production for hours, making it hard to fall asleep. So put away whatever you’re reading this on, set your thermostat to 65 degrees, and catch some z’s.

Diana Vilibert is a freelance writer and copywriter living in Brooklyn, NY. She loves flea markets, martinis, to-do lists, traveling, and wearing leggings as pants. You can see more of her writing at www.dianavilibert.com and follow her on Twitter at @dianavilibert.