Whether you’re stressed out about a big presentation or eager to hit the road for your next trip, we’ve all faced bouts of sleeplessness here and there.

According to sleep and health psychologist Joshua Tal, Ph.D., there was a time before the 18th century when waking up in the middle of the night wasn’t unusual.

“We would go to bed a little bit earlier than we do nowadays, and we would basically wake up in the middle of the night, go to the bathroom, hang out, maybe have a cup of tea, and then go back to sleep and sleep in a little bit,” Tal told mindbodygreen Health of the period before the Industrial Revolution.

For those of us in the 21st century, waking up in the middle of the night can sometimes mean sleep is hard to come by. In those moments, it can be useful to have some tricks to doze off again.

Here are a few tips on how you can spend less time staring at the ceiling and more time snoozing, according to CNN Health.

Stop eyeing the clock

It’s easy to keep glancing at the clock to see how much time you have left to try to get some shut-eye, but doing that will all but guarantee you won’t fall back asleep.

“Those that watch the time while trying to facilitate sleep only increase their inability to fall asleep,” Sharon M. O’Brien, a member of the American Academy of Sleep Medicine, wrote for Clinical Advisor. “If a patient feels as though they have been lying in bed for a long time, advise them to get up and go to another room until they feel tired again, but emphasize that checking the time is not important.”

Practice deep breathing

To help you doze off, you can try a breathing technique from Dr. Andrew Weil. A Harvard University Medical School grad, Weil is a physician and spokesperson for holistic health and integrative medicine practices.

The Alaska Sleep Education Center reported he teaches the 4-7-8 Breathing Exercise, also called the Relaxing Breath, which can naturally relax your nervous system.

Here’s a video explaining how to do it.

Listen to music

Calming doesn’t only benefit babies, according to the Sleep Foundation. One study found that adults who listened to 45 minutes of music before going to sleep were found to have improved sleep quality as soon as the first night. Participants also reported having better sleep the more frequently they fused music into their routine each night.

Write down what’s bothering you

Schedule time to get your worries out of your brain and onto paper.

Take 15-30 minutes every night to scribble your concerns on a notepad. Do so at least one or two hours before bedtime. That way, you won’t remain awake with anxious feelings.

“Ideal sleep depends on creating routines and schedules, and this is no different,” Dr. Lawrence Chan, clinical assistant professor of sleep medicine at The Ohio State University Wexner Medical Center in Columbus, told Everyday Health.

Get out of bed

This step may seem counterintuitive, but if you’re spending more than 20 minutes lying down and still struggling to go back to sleep, it’s better to get up.

The Cleveland Clinic cites sleep specialists’ recommendations to leave your bed and take a short walk. That can also get your brain focused on something other than your worries, which could be keeping you awake.