'Light towards the blue end of the spectrum is especially effective at keeping you awake.' Photograph: Sam Diephuis/Getty Images

Sleep is often perceived as the ultimate downtime. A chance for your brain and body to simply tune out and shut down. Nothing could be further from the truth.

For the past 70 years or so, researchers have worked long into the night in an attempt to unpack the secrets of sleep. Their work has revealed that you go through a highly regimented sequence every night of your life. It happened last night, and it will happen again tonight. As you nod off, you drift into a light sleep, progress into deep sleep, then have your first dream of the night. This cycle takes about 90 minutes and is repeated throughout slumber, with periods of deep sleep getting shorter and dreams getting longer.

Sleep also plays a key role in your psychological and physical wellbeing. Light sleep is vital for cementing memories in place, deep sleep helps to restore any physical damage, and you work through your worries and concerns during your dreams. Deprive people of their beauty sleep and the situation quickly gets ugly. In 2002 American researchers analysed data from more than one million people, and found that getting less than six hours sleep a night was associated with an early demise – as was getting over eight hours.

We are now facing an epidemic of sleeplessness. A few months ago I carried out a national survey into the UK's sleeping patterns to coincide with the publication of my book Night School. The results were terrifying. Nearly six in 10 adults in Britain – more than 28 million people – are sleep deprived and get seven hours or less each night. This is a significant increase on the 2013 figure of 39%.

Our work also assessed one potential cause of this new and worrying epidemic. Although any type of light stops you feeling sleepy, research has shown that light towards the blue end of the spectrum is especially effective at keeping you awake because it suppresses the production of the sleep-inducing hormone melatonin. Unfortunately, computer screens, tablets, smartphones, flat-screen televisions, and LED lighting all emit large amounts of blue light, and so it's important to avoid them before bedtime. We also asked respondents whether they used these devices in the two hours before going to bed. Worryingly, nearly 80% of respondents routinely use these devices during this period. Among 18- to 24-year-olds this figure increases to a remarkable 91%.

It is vital that people limit their exposure to blue light in the few hours before they go to bed. If you must use your smartphone, tablet or computer late in the evening, try turning down the brightness, ensuring that the device is at least 12 inches from your eyes, and using an app that dims the lighting on your screen at night.

However, my guess is that many people simply won't have the self-control to leave their devices alone before bedtime. The good news is that there is a simple solution. Amber-tinted glasses that block blue light are highly effective at improving sleep quality and mood. They may be commonplace within a few years.

When it comes to combating the epidemic of sleeplessness, the future is bright, the future is orange.