Eager to doze off only to ruminate on the tense conversation you had with your boss or the uncertain text your partner sent? When all you want to do is hit the hay after a long day, it can be frustrating when your mind disagrees and keeps you up.
“I just can’t shut off my brain,” is the common sentiment people tell Dr. Wendy Troxel, a sleep scientist at the RAND Corporation and author of Sharing the Covers: Every Couple's Guide to Better Sleep, she says. People often replay memories, thoughts, and concerns on repeat, she says, triggering a stress response that keeps the brain alert.
“Ruminating thoughts send a signal to the brain that there is more information that needs to be processed and there may be potential threats in the environment which stimulates the awakening response including the release of stress hormones,” Troxel says.
But thankfully, there’s a way to reduce rumination with practice. We need time to process our thoughts from the day and slow down.
“People are simply not giving their brains the opportunity to settle and unwind prior to going to bed,” Troxel says. “Instead they are racing through their days and then racing off to bed, wishing for sleep to occur like a light switch turning off.”
Here are tips for how to fall asleep even when you’re stressed:
Establish a wind-down routine
You may have heard experts tout the night wind-down routine, which allows the brain and body to prepare to rest.
Everyone’s routine looks different. Start by setting aside 30 minutes before your ideal bedtime to put away screens and electronics—anything that reminds you of the stress of the day. Try reading a book, taking a shower, or practicing mindfulness during this time. Notice how you feel during this activity and choose something that instills calmness.
“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,” says Darlene Marshall, a National Academy of Sports Medicine (NASM) certified wellness coach and expert in positive psychology.
Notice your thoughts and how sleepy you are
If you’ve had a particularly stressful day, it’s normal not to fall asleep immediately. Putting that added pressure to immediately turn off will only make it more difficult to fall asleep, Troxel says. Instead, consider delaying your bedtime or lengthening your wind-down routine.
“This will allow your natural sleep drive to intensify, which can lead to deeper, quicker, and more consolidated sleep,” she says.
Allot time to worry
It may be easier said than done, but practice scheduling out worry, as strange as it sounds.
Give yourself a specific time to worry, and set a timer to remind yourself you have gone through the motions but don’t need to carry the worry further. Troxel suggests setting a 15-minute window a couple of hours before bed and writing down everything that is worrying you on a piece of paper.
“When time is up, literally and figuratively close the book on worry and practice this nightly for several weeks,” Troxel says. “Over time, this exercise has been shown to reduce the habit of ruminating in bed and interfering with sleep.”
Breathe and be mindful
Practicing slow breathing, before bed and during the day, can calm the parasympathetic nervous system and reduce the body’s stress response. Breathe in for 4 seconds, hold it for 7, and breathe out for 4.
Try out a body scan before bed. Slowly center your attention on one body part at a time, moving your focus from head to toe, feeling the different sensations in the body as your heart rate slows down and you become more present.
Practice gratitude before bed
How you speak to yourself can influence your ability to destress and fall asleep. If you are hard on yourself for having a rough day and overthinking your every move, it’s no shock that closing your eyes won’t turn off the spinning wheels in the brain. Instead, practicing gratitude can lessen the stress response and calm the heart rate, says Dr. Shiv Rao, a cardiologist in Pittsburgh, Pennsylvania and CEO of Abridge. Whether you say it in your head or write it down, gratitude practices can help change the narrative on what you presume to be a bad day.
“It's understandable that when we're stressed we'd be slow to fall asleep,” Marshall says. “The story you tell yourself in those moments is going to impact what happens next.”
Practice stress reduction during the day
The key to falling asleep is managing stress throughout the day. Take breaks during the workday when you feel your eyes glossing over the screen. Get fresh air outside. Prioritize relationships that give you energy. Practice self-compassion.
So next time you feel overstimulated before bed, take a deep breath, slowly wind down, and don’t be so hard on yourself.
This story was originally featured on Fortune.com
More from Fortune:
5 side hustles where you may earn over $20,000 per year—all while working from home
Millennials’ average net worth: How the nation’s largest working generation stacks up against the rest
The best 5 ways to earn passive income
This is how much money you need to earn annually to comfortably buy a $600,000 home