Is there anything better than a good night's sleep - or anything worse than a bad one? It's not always easy to get all the rest you need, and there are plenty of products out there claiming to help you get perfect shut-eye. Dr Penny Lewis, psychology professor at Cardiff University, takes us through the science behind engineering your sleep.


Why is sleep important?

Sleep regulates the immune system, it’s involved in regulating our body temperature, and it has huge impacts on the brain. We see direct correlations between the breakdown of sleep as people age and atrophy of different parts of the brain, as well as shrinkage and cell death, and we think that is associated with descent into dementia and even Alzheimer’s disease.

Recent research has shown that sleep is really important for flushing toxins out of the brain. One of those [toxins] is beta-amyloid, which is deposited in the brain over time, and can build up and form the plaques that are associated with Alzheimer’s disease.

Read more:

Sleep has been shown to facilitate that flushing by up to 80 per cent compared to a waking state. And that’s just an example of one toxin, and it’s likely that sleep is involved in flushing many out.

When you’re involved in shift work, you’re sleeping in irregular patterns, so you see increasing instances of things like heart disease and breast cancer. [Shift work has] been linked to shortening the duration of people’s lives by up to 10 years. That’s not even necessarily shorter sleep, but sleep at the wrong times.

More like this

What should we do to get a good night's sleep?

Sleep hygiene is the number one thing that everyone can do to enhance their sleep. Keep a regular schedule: go to bed at roughly the same time every night and wake up at the same time every morning. Make sure you have a place to sleep that’s dark, quiet and comfortable.

I would recommend blackout blinds and wearing an eye mask. Your sensitivity to light is genetic, so some people’s sleep is not disrupted by light at all, but a high proportion of people actually find when they try blackout blinds or an eye mask that it enhances their sleep dramatically.

The optimal room temperature for sleep is 15°C to 17°C. If possible, open a window to let some fresh air in. Knock off the caffeine at least seven hours before you go to bed, and don’t have huge amounts of sugar before bed either. These are the things that make more difference than anything else.

Is there an optimal time to sleep?

You might have heard about larks and owls: these are actual genotypes. Larks are homozygous for a gene that biases them towards wanting to get up really early in the morning. These are the people who bounce out of bed at 5.30am and feel really awake and alert. By the late afternoon they’re waning and they need to go to bed early, so the optimal time for them is different to the optimal time for an owl.

Owls are homozygous for the opposite gene – the one that makes people want to stay up until 3am or 4am. That’s their most productive awake time, and then they want to sleep until noon. What we’ve found is that it’s much better not to force people into a schedule, it’s better for people to figure out what type they are and go with that. But the majority of the population is heterozygous, so they’re a combination of those two: they fall somewhere in between.

Read more:

You research sleep engineering. What is that?

It’s an emerging science based around manipulating the sleep that people get in order to enhance its impact on health and cognition.

We are trying to enhance slow wave sleep, one of the deep phases of sleep, which is characterised by these high-amplitude, slow-oscillation brain waves, caused by loads of neurons firing in synchrony. When people are in slow wave sleep, we play a little click sound when they’re approaching the peak of an oscillation, soft enough that it won’t wake them up.

It enhances the synchronisation of the neurons so you get a higher peak and a deeper trough, which boosts memory consolidation. The method was developed by Hong-viet Ngo in Birmingham, and lots of labs around the world are using it. We’re trying to optimise it.

Slow wave sleep is one of the things that breaks down with age, so we’re trying to enhance the amplitude of those waves to help people get more and deeper slow wave sleep; both healthy young people and older people.

What other parts of sleep can you engineer?

We’re also interested in whether sleep can help with processing emotions. There’s a theory from Matt Walker at Berkeley which suggests that if you replay memories in REM sleep, you may strengthen the memory but remove the emotional content from it. We have been trying to test this by triggering replay in slow wave and in REM to see what happens to the strength and emotionality of the memory.

We could use this in PTSD, where people have traumatic memories that seem to get more and more traumatic, rather than gradually being forgotten. If we could reduce some of that emotional content just by triggering replay during sleep, that’d be amazing.

Read more:

What are the best sleep gadgets?

Boost your 40 winks tonight with these sleep-promoting gadgets.


Dreem headband

€499 (£425 approx),
€499 (£425 approx),

The Dreem Headband employs the techniques that Dr Penny Lewis is studying in her lab. It tracks brain activity, heart rate, movement and breathing to identify sleep stages in real time, and plays sounds to improve your sleep. Lewis warns that this method is still being refined, but is excited that products like this allow users to have a go at home.


Any eye mask

From 49p, various retailers © Getty images
From 49p, various retailers © Getty images

If you’re one of those sleepers who’s woken up easily by light, this low-tech solution could hugely improve your sleep, especially as the mornings get lighter.



Free, with in-app purchases,
Free, with in-app purchases,

Pzizz is an app that plays soundtracks to help you sleep, layered with voice narrations that are based on clinical sleep techniques, like breathing exercises and guided meditations. Like most sleep interventions, this won’t work for everyone, but it works well for some.


Fitbit Charge 2


Though you can only track sleep cycles with precision using EEG, these trackers, which use movement and heart rate to provide sleep data, make a reasonable guess. This information helps some people create healthy sleep habits. For others, it’s just something extra to worry about.


Sound+Sleep Mini


This portable sleep sound machine plays white, brown or pink noise – depending on your preference – to drown out noises that might otherwise wake you.

  • This article was first published in BBC Science Focus in May 2019 – subscribe here


Follow Science Focus on Twitter, Facebook, Instagram and Flipboard


Helen is a freelance science and travel journalist, with a background in neuroscience and physiology.