A must-read for anyone who has ever struggled to stay alert at work, despite following all the standard sleep advice

You're doing everything right: you avoid eating, drinking alcohol, and technology before bed, you sleep in a dark, cool room, and you've established a pretty regular bedtime routine. Yet some nights you still find yourself staring at the ceiling. What gives? Chances are you're still missing out on some not-so-obvious behaviors and decisions that could be harming and disrupting your sleep. Here are four of the most common culprits:

You Set Your Alarm for the Wrong Time


Ever wake up after a seemingly great night of sleep-say 10 hours-and still feel exhausted? It's actually a very common problem. Most people arbitrarily set their alarm for when they need to wake up, but you should really set it according to when you body wants to wake up. It's easier than it sounds. You see, grogginess and feeling refreshed isn't necessarily caused by how many hours you sleep, but instead by the number of complete sleep cycles you enjoy, according to research published in Applied Cognitive Studies.

When you sleep, you go through five different cycles, with the final phase being REM sleep (the period when dreams occur). During phase one, your vital signs are closest to being awake. During stage four, you're in your deepest sleep, with your heart rate and blood pressure dropping by as much as 30 percent. Each five-phase sleep cycle lasts about 90 minutes.

So what happens when you wake up during your deep sleep? It's probably how you feel every Monday morning-exhausted and like you can't concentrate. This is known as sleep inertia, and a study published in the Journal of the American Medical Association found that morning grogginess could be a bigger impairment than not sleeping at all. (Not that we need to tell you; coffee is popular for reason.)

Your solution: Time your sleep so that you don't wake up during the wrong phase. A good rule of thumb is to aim for seven-and-a-half or nine hours of sleep per night. If you must sleep less, sleeping six hours might be more restful than seven because you're more likely to wake up in the first phase of sleep as opposed to a jarring alarm in the middle of your REM sleep.

You Sleep with Your Pet


Bad news for pet lovers: It might be best to restrict animal visits to the daytime. Based on a study conducted by the Mayo Clinic Sleep Disorders Center, pets are one of the most common causes of sleep problems. In fact, 53 percent of people who sleep with their pets have abnormal sleep patterns and disturbed rest. And it's not Fido's fault. Most animals have different sleep cycles than humans, meaning it's only natural for them to stir or awake in the night. As much as you love your dog or cat, you'll both benefit by having your own beds.

The Vitamin D Paradox


Vitamin D deficiency is most often associated with causing your bones to become brittle, thin, or misshapen. But not having enough D in your system can also cause sleep problems and daytime sleepiness, according to scientists at Louisiana State University. And we're not just talking about some restless nights. Research has linked vitamin D deficiency to sleep disorders such as insomnia and sleep apnea.

Naturally you might assume that you should pop a few vitamin D pills before bed, but that would actually be a bad idea. Vitamin D is known as the "sunshine vitamin" for a reason-sun exposure spurs the body to produce it. This also means that it's an indicator of light and daytime. So when you take vitamin D, it decreases levels of melatonin, the hormone that helps control your sleep and wake cycles by naturally rising in the mid- to late-evening. In some experimental trials, taking vitamin D at night decreased REM sleep and the number of hours in nighttime slumber.

Your best bet is to supplement with vitamin D (1,000 to 2,000 IU a day) first thing in the morning or during the afternoon. You'll reap all the proven benefits-strong bones, protection from high blood pressure, cancer, and several other autoimmune diseases-without missing out on quality sleep.

You're Not Getting Enough Sunshine


Even if you're in the habit of taking vitamin D supplements, there's still a reason to step outside every day. Sleep is a result of your natural circadian rhythms, which are reactions to knowing when you should be awake and when you should be asleep. Think about it: The reason experts recommend turning off electronics before bed (a common sleep disturbance), is because they emit blue light, which is similar to the light you're exposed to during daytime. This light signals to your body that it's daytime, which disrupts your natural production of melatonin and hurts your ability to sleep.

To fall asleep with ease, your body needs to know that it's time for bed. In other words, when the sun is out, you need to see it. This builds a more natural circadian cycle of light so when it's dark, your body is more prone to fall asleep naturally, without any aids, pills, or noise machines.

To create a longer daytime circadian cycle (and thus trigger a quicker release of melatonin when it's dark), try to experience sunlight as early as possible in the early morning. Going for a quick walk or simply stepping outside shortly after you wake up will suffice.