You know those frustrating nights where you endlessly toss and turn, feeling tired yet unable to fall asleep? Or maybe you’ve been waking up at 3 a.m. raring to go yet longing for just a few more hours of rest? We’ve all been there, and we all know what it feels like when we haven’t had a good night’s sleep.

If you’re frustrated and wondering why can’t you sleep, here are some of the most common reasons you can’t catch your Z’s and what you can do to feel more rested and refreshed.

1. You’re Getting Too Much Blue Light Exposure

You may have heard that blue light can impact your sleep, but why? Is spending time on your tablet before bed really the reason you can’t fall or stay asleep? Yes, the fact is that blue light has a major impact on your circadian rhythm, which helps regulate a wide range of functions, including your natural sleep-wake cycle. And evening exposure to blue light suppresses melatonin, the hormone that signals that it’s time for bed, helps you sleep, and even plays a role in preventing cancer.

The good news is that taking charge of your exposure to blue light can improve your overall health and sleep. One of the best ways to avoid the dangers of blue light at night is to give yourself a two-hour device-free time period before bed, but not all of us are willing to do this. So, if that’s the case for you, consider wearing a pair of blue light blocking glasses. Some studies have confirmed their benefits, including enhanced sleep and improved mood — but keep in mind that they need to be dark yellow/amber colored in order to receive the benefits. 

2. You Need Better Sleep Habits

Maintaining proper sleep hygiene (aka your sleep habits) is one of the most important — and easiest — steps you can take to improve your sleep. The Centers for Disease Control and Prevention explains that “good sleep habits can help you get a good night’s sleep.” Seems simple right? So, what does good sleep hygiene involve?

Keep your room cool and dark (use light-blocking shades if necessary), go to bed at the same time every night, even on the weekends, don’t use devices in your bedroom and avoid caffeine, large meals and alcohol before bed. In addition, don’t hang out in bed during the day if you can avoid doing so — you want to create the connection between your brain and body that “bed means sleep.” If you still can’t fall asleep after 15 minutes, leave the bedroom and read or do another restful activity until you feel sleepy again.

3. You’re Too Wound Up

Sleep researchers know that stress is one of the major reasons we can’t sleep, yet we need quality sleep to help us be more stress-resistant, according to a study published in the International Journal of Environmental Research and Public Health. Tension and excess worry can keep us awake into the wee hours of the morning. We might toss and turn trying to figure out problems or worry about those things that we know we really can’t influence in the middle of the night anyway. But while it’s easy to say, “stop stressing” or “don’t worry so much,” we all know that doesn’t help us very much.

So, what can you really do to ease up on stress? Being mindful, connecting with others and taking some “me” time when needed can help. The Sleep Foundation also advises meditating and getting moderate exercise in the morning or early afternoon. Exercise can help boost the production of endorphins, which are your body’s natural feel-good chemicals that reduce stress and improve your mood. If that doesn’t help, you can seek a therapist qualified to provide Cognitive-Behavioral Stress Management or Pythagorean Self-Awareness Intervention, two forms of therapy that have been proven to help people with stress-related insomnia.

4. You’re Depressed or Anxious

Studies have found that there is a high correlation between sleep disturbances and depression and anxiety. One such study published in the journal, Sleep, found that “people with insomnia had greater depression and anxiety levels than people not having insomnia.” If you’re feeling more blue than usual, or if you find that you’re experiencing excessive worry and tension, it’s worthwhile to talk to your doctor or consult a qualified mental health professional. There’s no shame in reaching out for help — addressing the condition can not only improve your sleep, but it can also help you feel happier and healthier.

Sleep is critical for optimal health and well-being, so take charge by taking some time to figure out and address what’s keeping you awake at night. If problems persist, consult your doctor. Sometimes, insomnia can be caused by medication side effects or another underlying medical condition not mentioned here, so further evaluation may be needed for proper treatment.

5. You Have Sleep Apnea

People often think sleep apnea only happens to overweight men, and while it is, in fact, more likely to occur in men, women can suffer from this disorder too. Sleep apnea is a relatively common reason for poor or unrefreshing sleep. According to a clinical review in the New England Journal of Medicine, sleep apnea is thought to affect between 2-4 percent of middle-aged adults. It’s a serious medical condition that can have major health consequences if left untreated.

While snoring is a common feature of sleep apnea, not all people with the disorder snore. If you do snore at night or you often feel tired when you wake up, you should talk about it with your doctor. For many people who are overweight, shedding excess pounds can be a good first step, but in more moderate to severe cases a range of different treatments and therapies can help.