You might like reading on your smartphone or tablet in bed, but it could be ruining your sleep.

That’s because the blue light from these devices’ screens suppresses our bodies’ production of melatonin, which is the hormone that induces sleep. Not only does this leave us cranky and not as alert as we could be, it could also have serious repercussions for our health – lack of sleep is associated with an increased risk of weight gain, heart attacks, diabetes and cancer.

So how do you make sure your phone or tablet isn’t ruining your sleep? Read on, and all will be revealed.

Tip 1: Put your device down

Woman on tablet in bed

The easiest way to stop your device ruining your sleep is to not use it before bed. Experts recommend not using your device half an hour before you go to bed, to give you ample time to switch off. If that’s not possible, these other tips will help.

Tip 2: Use a dimming app

Screen dimming screenshot

Android phones currently don’t have a dedicated night mode, but some apps let you dim the screen without having to delve into the settings. Screen Dimmer (free) lets you adjust the filter opacity of the screen – the higher it is, the darker the screen will be.

Tip 3: Fire up Chrome’s Reader Mode

Chrome reader mode

You’re reading on your phone, just starting to nod off, when an annoying advert starts playing, jarring you back awake. Not with Google Chrome’s Reader Mode. If you've got an Android device it strips out all the unnecessary images and adverts, and reformats the page to fit your screen.

To enable it, start the Google Chrome browser and type chrome://flags into the navigation bar. Scroll down to Reader Mode triggering and select Always from the sub-menu.

Now when you launch a page on Chrome, a banner appears along the bottom that reads 'Make page mobile-friendly'. Click that, and the ads will be gone and the text reformatted.

[Read more: 12 ways your smartphone can save you money]

Tip 4: Apple’s Night Shift

Apple’s Night Shift changes the display colours depending on your location. This feature is due to launch with iOS 9.3, find out more here.

Tip 5: Do Not Disturb

Screenshot Do Not Disturb

It’s not just the light from your screen that could stop you getting a good night’s sleep, what about all those emails, text messages and calls in the middle of the night? Thankfully, there’s a way to silence them without getting out of bed.

Android users: Open Settings, go to Sound and Notification and click Do Not Disturb. You can set what can get through (if anything) and from who, and what times this should apply.

Apple users: Find out how to use Do Not Disturb here.

Tip 6: Use a sleep tracker app

Sleep Tracker app

A sleep app can help you monitor your sleeping habits, and set the right environment in which to sleep.

SleepBot (for Apple and Android) is free, and keeps tabs on how disrupted your sleep is using a motion sensor and a sound recording mechanism.

You can then see which night you slept best, and try to recreate the conditions (avoiding certain foods/alcohol etc). Sweet dreams.

Read more: Gadgets and aids to help you sleep better