If anyone is the queen of sleep anxiety, it might be me. I spend the night lying awake, unable to shut my brain off from ruminating thoughts. They either prevent me from falling asleep for hours, wake me up in the middle of the night, or act as an alarm clock well before my iPhone chirps at me bright and early. I’m left feeling, quite obviously, exhausted.
By the following night, my anxieties and stress have eased but I’m left with a new worry: That I won’t be able to fall asleep again, resulting in yet another restless night. It’s a self-fulfilling prophecy, because that fear leaves me tossing and turning yet again.
And so goes the vicious cycle of sleep anxiety, which Dr. Raj Dasgupta, a pulmonary, critical care, and sleep medicine specialist at the University of Southern California and Chief Medical Advisor for Fortune Recommends Health, defines as “the stress or worry about falling asleep or staying asleep, often accompanied by physical symptoms like a racing heart.”
Maybe you can relate. After all, he tells Fortune, sleep anxiety is quite common among many people and often stems from various factors like past sleep issues; poor sleeping habits, like an irregular schedule or screen use too close to bedtime; stress from major life changes such as a new job or financial problems; or ongoing health issues, like chronic pain or breathing problems.
“People with anxiety or PTSD often face sleep anxiety because their constant worries and stress make it hard to wind down at bedtime,” he adds. Over 40 million adults have some type of anxiety disorder, which can make it harder to sleep and result in a case of insomnia—half of which are related to anxiety, depression, or stress.
Research shows that people with anxiety have higher sleep reactivity, which means they’re more likely to have difficulties sleeping due to stress.
Sleep anxiety not only makes us irritable and overwhelmed, but can heighten our chances of diabetes, stroke, heart disease and heart failure, and high blood pressure, according to the Cleveland Clinic.
Still, whether your anxiety is leading to insomnia, or your insomnia is leading to anxiety, there are ways to get out of the throes of sleep debt.
Calm your body
“Try to relax instead of worrying about falling asleep,” advises Dasgupta.
Easier said than done, right? The whole problem with anxiety is that relaxing feels next to impossible.
But you can try a few relaxation techniques, such as progressive muscle relaxation, which involves tensing and releasing each muscle in your body. Practicing mindfulness or deep breathing exercises can also help calm your mind and body before bed, Dasgupta says.
Slow breathing, before bed and during the day, can calm the parasympathetic nervous system. Try box breathing, which involves inhaling for four seconds, holding for four, exhaling for four, and holding for another four before beginning the cycle again.
Reframe your thinking
Self-regulation can also help you relax. Dasgupta says you should change any negative thoughts about sleep or anxious thoughts about the day keeping you up at night into more positive ones.
The first step is to recognize these ruminations. Once you’ve developed that self-awareness, try to challenge those thoughts by seeing if you can prove them wrong. Practicing positive self-affirmations and gratitude can help with this—and journaling them to process these feelings before bed is even better. One study found that writing out your to-do list for five minutes before bed can help you fall asleep faster. .
If you’re struggling to reframe them, consider trying Cognitive Behavioral Therapy for Insomnia (CBT-I), which Dasgupta says can help you learn how to deal with sleep-related thoughts and behaviors. It focuses on retraining your mindset to see the bed as a place for sleeping only.
Create a routine
Routines can help reduce anxiety, and having a calming one at night also makes for good sleep hygiene. Stick to a regular sleep schedule by going to bed and waking up at the same time each day, Dasgupta says, and practice the same habits prior to your bedtime.
That might involve throwing in a warm bath at night to help signal that it’s time to relax. It should definitely mean avoiding caffeine and heavy meals, which can disrupt your sleep.
If you’re craving a nighttime snack, experts suggest fruits like kiwi—nutrient-loaded food can help facilitate sleep—or even whole grain crackers, since complex carbs can make you sleepy. Foods rich in magnesium or tryptophan, like almonds or sunflower seeds respectively, can also be a good choice.
And cut screens and electronics 30 minutes before bed, Darlene Marshall, a National Academy of Sports Medicine (NASM) certified wellness coach and expert in positive psychology, previously told Fortune.
“What many people don’t realize is the light from your phone, the volume of the TV while you watch a murder documentary, or the blood sugar spike from your food are all forms of overstimulation that keep our nervous systems set to the ‘on’ position,” she said.
Create a soothing environment
The best bedroom for sleeping is one that is cool, dark, and quiet, Dasgupta says. The National Sleep Foundation recommends lowering the temperature to 60 to 67 degrees for optimal sleep. If you’re on a busy street with noise or streetlights, consider using a white noise machine or throwing on an eye mask to avoid overstimulation that can heighten anxiety.
“Also, keep clocks out of view to avoid stressing about how long you’re awake,” Dasgupta says. (This is why I personally never scroll through my phone when I’m awake in the middle of the night.) Even better: Keep your phone in a different room at night.
If these steps don’t help, Dasgupta recommends talking to your doctor or a sleep specialist for more support.