How many times have you fallen asleep without any problem, only to jolt awake at 3 in the morning? It’s one of the most annoying things in the world, especially if you’re trying to get a decent night’s sleep. But the reasons you’re waking up in the middle of the night may surprise you.

This disturbance in your sleep, referred to as sleep maintenance insomnia by the Mayo Clinic, can rob you of precious shut-eye and rest. It’s easy to get annoyed at being awake so late, start to stress out, and ruin any possibility of nodding off again. And it can be caused by anything from hormonal imbalances to distractions in your sleep environment. Even what you have to drink during the day can have a huge effect on your ability to sleep through the night (and this doesn’t just mean coffee).

So here are the things to look out for if you keep starting awake long before your alarm is set to go off. Even if your sleep hygiene is otherwise excellent, if you have chronic pain — or even a baby on the way — getting a full seven to eight hours of rest may continue to elude you. But if something on this list sounds familiar, you may be that much closer to getting the sleep you need.

1. The Environment


Keeping your bedroom dark, cool, and quiet is crucial. "Sometimes light coming through the shades can be a problem," James Findley, clinical director of the Behavioral Sleep Medicine Program at the University of Pennsylvania, told Huffington Post. "So you can get heavy curtains to cover that." Otherwise, the light could make you wake up way too early.

2. Hormone Imbalance


If your hormone ghrelin, which may initiate eating during certain times, gets out of whack, hunger may make you wake up in the middle of the night. "Night eaters have an abnormally high level of ghrelin in the blood between midnight and morning," Judith J. Wurtman, Ph.D. and co-author of The Serotonin Power Diet, said in Psychology Today. "It is as if this hormone is out of sync with the other hormones, primarily melatonin, that should be keeping them asleep, not microwaving pizza or defrosting a steak in the middle of the night." If you're getting up at 2 am for a second dinner, then it may be a good time to visit your doctor for a checkup.

3. Too Much Caffeine


Sorry, fellow coffee addicts: your favorite beverage can really hurt your sleep schedule. "Avoid caffeine after noon," Timothy Morgenthaler, former president of the American Academy of Sleep Medicine, told Mayo Clinic. It might be the cause of your sleep maintenance insomnia.

4. Overheating


This is another potentially easy fix. According to the National Sleep Foundation, the ideal bedroom temperature should be between 60 and 67 degrees Fahrenheit. This is one instance when you want things to cool down in the bedroom.

5. Anxiety


Feeling anxious about not sleeping can form an exhausting feedback loop. "The biggest health risks for insomniacs, if they're not treated within six months, are mental illness and alcohol abuse," Ralph Downey III, director of the Sleep Disorders Center, said in Health. If your inability to stay asleep is triggering anxiety, then it may be time to speak with a specialist.

6. Pregnancy


Crappy sleep can be yet another joy of impending motherhood. "During the first trimester, many women find that they may have an increased need to wake up at night due to urination, stress and nausea," Shelby Harris, a licensed clinical psychologist, told Psychology Today. You can think of it as training for when the baby arrives.

7. Alcohol


That late-night glass of wine can backfire. "Contrary to popular belief, that seemingly harmless nightcap before bed may be relaxing at first but has a rebound effect and can cause you to wake up in the wee hours of the night," As Carl E. Hunt, director of the National Center on Sleep Disorders Research at the National Institutes of Health said in WebMd. Perhaps a mug of chamomile tea could do the trick?

8. Pain


Lack of sleep and chronic pain can have a circular relationship. "We normally go through four to six cycles of these stages per night," psychiatrist Tracey Marks told WebMD. "But if pain wakes you up, you spend too much time in light sleep." And having too little sleep can make your pain feel worse. It's a vicious cycle.

9. Depression


Waking up periodically can be an indicator of depression. "The depressed person wakes up repeatedly, agitated or restless, sometimes from a bad dream, then returns to sleep only to wake up prematurely, unable to get back to sleep," Fredric Neuman, director of the Anxiety and Phobia Treatment Center, told Psychology Today. If you appear to have other symptoms of depression, then this may be a good reason to speak to a counselor or physician.