Tossing and turning all night never feels good. An estimated 164 million people struggle with sleep at least once a week. Insomnia can do worse than just tire you out the next day. If you’re suffering from a chronic lack of sleep, it can take a toll on your overall health.

Ongoing sleep deficiency can lower your immune system, making it harder for your body to fight infections. It can trigger mood changes like irritability, depression and anxiety. And insufficient sleep can cause you to gain weight; an increased risk of developing heart disease, high blood pressure, and type 2 diabetes; and even shorter life expectancy.

In the same vein, good sleep habits promote everything from memory to good mental health to hormone regulation and healing. While some may turn to prescription sleeping pills to catch some zzzs, others are wary of side effects. That’s why we asked sleep experts to share their go-to insomnia hacks to find out the best ways to nod off at night.

Put away technology:

This is number one—most of us have this reflex where our cellphone has to be within arm’s length, even when we go to bed. We need to break that habit. Studies have shown that the blue light generated by electronic devices can delay the onset of sleep.

Turn your phone on silent and keep it on a dresser or far end of the bedside table so you’re not tempted to text, check one last email, or get lost in social media.

Related article: The Best Solutions To Help Prevent Sleep Problems And Aid A Better Sleep

Get out of bed:

If you can’t fall asleep within 20 minutes, leave your bed and do something non-stimulating in another room. Read a real book—not an e-book—and avoid anything that may cause you stress or aggravation, which further prevents sleep. Once you feel drowsy, crawl back into bed.

Related article: 9 Fabulous Foods to Help You Sleep Better And Feel Revitalised

Try bedtime yoga:

Yoga relaxes your body and mind, making it perfectly primed for sleep. Try simple poses that allow you to focus on your breathing and releasing the tension of the day. Try sitting cross-legged and bending all the way forward, reaching your arms out straight in front of you with your head facing the ground.

Related article: Try These 6 Restorative Poses From The Comfort Of Your Bed To Assist A Refreshing Vibrant Sleep And Body

Work out at least a few times a week:

Regular exercise will go a long way toward improving your sleep. Finding the perfect time in your day where a workout won’t hinder your sleep is crucial—some people have no problem falling asleep after an evening workout, but others may need to hit the gym first thing in the morning.

The key is working out at least several times a week, whether it’s a 10-minute walk, a yoga class, or a sweaty weight-lifting session. I don’t want people to rule out exercise. For a lot of people, evening exercise is okay and doesn’t interfere with sleep.

Related article: Utilise These 10 Ways To Effectively Combat And Recover From Soreness After A Workout

Create a pre-sleep routine:

Insomnia sufferers may find relief by engaging in a “power-down hour” right before bed. One hour before lights out, chop it into three 20-minute segments of activity. Most sleep problems are related to stress, and dealing with stress is really important.

Spend 20 minutes doing something you enjoy (non-stimulating, of course), take 20 minutes for your hygiene routine, and use the last 20 minutes to employ a relaxation technique that works for you, such as meditation or yoga.

Related article: Hygiene Worries In The Way Of Your Gains? Five Tips To Help Stay Clean And Healthy!

Do mental math:

If you’re up at 3 a.m., it’s usually because of your brain. Insomnia is often caused by a cognitive component such as depression or anxiety. Mute your mind by counting backward from 300 by 3’s.

It’s so mathematically complicated that you can’t think about anything else, and so boring that you fall asleep.

Related article: Use This Week-Long Menu Of Healthy, Easy Breakfasts To Power Your Workout And Start Your Days Off Right

Build a sleep sanctuary:

Your bedroom environment plays a big part in how well you fall and stay asleep. Too many people forget to optimize their sleep environment, and it has a real detrimental effect on their rest. Things to keep in mind: How old is your mattress, what’s the temperature like in your room, and is it really dark at night?

Leave the distractions at the door and create a bedtime ritual for yourself: darken the shades, take a hot bath, and, most importantly, set a media curfew for yourself so you’re not laying in bed looking at your phone for an hour. Turn off all the screens and sit with a cup of tea or a notebook in dim light.

Training your body to wind down at the same time every night will help your inner biological clock know when to sleep, and you’ll wake up feeling much more refreshed the next day.

Related article: 3 Simple Butt Exercises To Help Lift And Tone That You Can Do Right Before Bed

Eat more magnesium-rich foods:

We recommend magnesium to insomnia patients because it calms down the nervous system. But because the evidence around magnesium as a sleep aid is sparse, you might consider incorporating more magnesium into your diet rather than spending money on a supplement. It’s found in quinoa, almonds, spinach, pumpkin seeds, peanuts, black beans and brown rice.