Checking your email right before bed is one of those bad habits you know you shouldn’t do — but you do it anyway. However, this is one bad habit you should really break for the sake of your sleep and mental health.

Spending time on your phone or computer right before bedtime can lead to stress and insomnia, and make it difficult for you to get a good night’s sleep. Ditch your phone at least an hour before bed, and do something relaxing, like yoga or meditation, for a more calming bedtime routine.

What Happens When You Check Email in Bed

When you look at your phone in bed, a few things happen, and none of them are good. Although it can be settling to know that your inbox is free of surprises for the morning, checking email in bed is usually the opposite of relaxing.

You feel stress.

Reading email is usually for work, but you’re not at work when you’re in bed. Bedtime is an inappropriate time to deal with work issues, no matter how pressing. It’s best to avoid all screen time in the hour or so before bed, but at the very least, you should take care of any issues via email before you start your bedtime routine. When you’re stressed, the production of the stress hormone cortisol rises. Excessive production of this hormone can cause insomnia, making it difficult to fall asleep or stay asleep.

You’re exposed to artificial light.

The blue light emitted from screens, even small ones, can confuse your circadian rhythm. When you see bright lights at night, your brain and body may think it’s daytime, and therefore, time to be awake. This can leave you feeling alert when it’s time to fall asleep. You can use your phone’s night feature to adjust your screen from blue to warm yellow light, but it’s best to avoid your phone’s bright screen altogether.

You’re associating your bed with work.

Your bed should be used exclusively for sleep, reading and sex. This helps to train your brain to feel sleepy when you lay down in bed. Otherwise, you may associate your bed with work, stress, and alertness, which can make it difficult for you to relax and fall asleep.

What to do Before Bed Instead of Checking Your Phone

Maintaining a healthy bedtime routine can help you relax at night and get better quality sleep. With a regular routine, your brain and body will start to predict that it’s time to go to sleep, and start automatically feeling sleepy as you start your routine.

Your routine can be as simple or as complicated as you’d like. For example, a good bedtime routine can include finishing up with email at least an hour before bed, then doing a brief yoga routine before washing your face, brushing your teeth, and changing into pajamas. Once you’re in bed, you can practice mindful meditation, such as progressive muscle relaxation, counting meditation, or mindful breathing.