How to get a good night's sleep - whether you're struggling to drop off or failing to stay asleep

Whether you're struggling to drop off or failing to stay asleep, Jennie Agg speaks to experts with a solution for every generation

Dr Neil Stanley, an independent sleep researcher and author of the book How To Sleep Well, suggests anxiety, burning the candle at both ends and technology use are likely to be the biggest sleep disruptors for people in their 20s

As the benefits of sleep for physical and mental health continue to pile up, we've become obsessed with whether we're getting enough. In an effort to achieve better health and wellbeing throughout your lifetime, experts reveal how to improve the quality of your slumber, whatever your age.

20s

Dr Neil Stanley, an independent sleep researcher and author of the book How To Sleep Well, suggests anxiety, burning the candle at both ends and technology use are likely to be the biggest sleep disruptors at this age. "So ditch the sleep tracker app, limit social media late at night and buy an old-fashioned alarm clock - ideally, leave your phone out of the bedroom altogether," he says.

At the very least, keep the screen face down - a Stanford University study from 2011 found even the short bursts of light from a message or notification can still be enough to disturb your bodyclock.

"People under 27 are more likely to be night owls, which can be a problem when they enter the workplace," adds James Wilson, a sleep behaviour expert who has worked with the Royal Society for Public Health. "Simply going to bed earlier won't help - don't force yourself to be in bed by 10 or 11. Instead, focus on quality over quantity and on establishing a wind-down routine at least an hour before you would ideally want to fall asleep.

"If you're watching TV before bed, make it funny or trashy, rather than something with a cliff-hanger, so your brain can start to switch off."

30s

"This is when work, financial stress and raising a family all kick in," says Neil Stanley.

If you're lying awake, brain whirring, Wilson and Stanley both say the key thing - rather than attempting any particular exercise or counting sheep (which Oxford University has officially debunked for its sleep-inducing abilities) - is to stop actively trying to sleep, as this will only make matters worse. "Avoid getting into that mindset of counting how many hours you've got left before you need to be up, worrying about how tired you'll be," says James Wilson. "Instead, try thinking about a time you had little or no sleep, but managed to perform fine. Reassure yourself that you've coped before, and you're much more likely to calm your brain so sleep can happen."

For women in their 30s, pregnancy can bring insomnia, and waking throughout the night.

As many as one in four pregnant women are affected by restless legs syndrome, says Dr Leschziner. This neurological disorder causes an uncontrollable urge to move the legs, or sometimes an itching, tingling, burning or creepy-crawly sensation. It tends to be worse in the evening, stopping people falling asleep. "Low iron is a common trigger and supplements can treat it," says Dr Leschziner. "It is worth asking your GP to check."

Of course, the broken nights really begin when baby arrives. Parents suffer disturbed nights for six years afterwards, according to research published this year by the University of Warwick. And a disturbed night's sleep leaves you feeling as bad as a short one.

"Once a child gets past feeding, my advice is to take turns on night time duties rather than splitting them in the same night," says Neil Stanley.

40s

Heavy snoring caused by sleep apnoea is common as people hit midlife, says Dr Leschziner. Sleep apnoea is where the soft tissues in the throat collapse during sleep, temporarily - but often repeatedly - obstructing breathing, disturbing sleep, although you may not remember in the morning. It's associated with being overweight, and particularly with weight around the abdomen and neck.

"If you're snoring, tired in the day, or waking yourself up choking or gasping this could point to sleep apnoea," says Dr Leschziner. "The first thing to try is weight loss."

It can also be treated with a continuous positive airway pressure (CPAP) device - a small pump and breathing mask to keep the airway open.

Stanley suggests this may be a good age to consider a 'sleep divorce': separate beds, or even bedrooms. "It's got nothing to do with the strength of your relationship," he says. "It's just pragmatic. We know from research that the majority of sleep disturbance is down to your bed partner, whether it's physical movement or the noises they make."

50s

Women going through the menopause between the ages of 40 and 59 are more likely than both post- and pre-menopausal women to sleep for less than seven hours a night, according to a US research. "Hot flushes are likely to be the biggest problem, as to fall asleep you need to lose one degree of body heat," explains Neil Stanley. "So avoid doing anything that raises body temperature at night: wear cotton pyjamas, don't eat late or drink alcohol or exercise in the evening."

Sleep practitioner James Wilson adds: "People in midlife are often sold memory foam mattresses, but memory foam is not great for temperature regulation. You'd be better off with one with more breathable, natural fillings."

For both men and women, it's common for sleep to be disturbed at this age because you need to get up to go to the loo. "Getting up once in the night is perfectly natural," says Stanley. "But more than that is a problem, so you really need to see your GP."

He advises avoiding alcohol, which stimulates the bladder, in the evening, and making going to the loo the last thing you do before you switch off the light. "Obviously, avoid drinking large amounts of fluid before bed, but make sure you have water to sip to avoid getting dehydrated as, conversely, that can also wake you up."

60s

It's a myth that we need less sleep as we age, according to Dr Leschziner. "They probably need just as much as younger adults, but they're less good at achieving it," he says.

"An important one to watch out for at this age is REM sleep behaviour disorders, which tends to be something we see in older men," says Dr Leschziner. This is where people start to act out their dreams at night. "Often this can have a violent component, with people thrashing around and kicking their legs, risking injuring themselves and their partners," he says. These are distinct from sleepwalking or night terrors and tend to occur in the latter half of the night, because that's when we have most of our REM sleep.

"People should seek medical help," says Dr Leschziner. "It can be treated with medication. We also know that it can sometimes be a precursor to other neurological disorders, including Parkinson's and Lewy body dementia."

James Wilson says retirement can also trigger sleep problems. "Getting into the habit of late nights and lie-ins because you don't have to get up for work, can confuse the body clock - our bodies like consistency," he says.

Drugs for age-related problems - such as pain medication and PPIs for acid reflux - can also interfere with sleep, adds Neil Stanley. "Have a conversation with your GP, there may be alternatives."

70s and beyond

"Unfortunately, insomnia in this age group is very common," says Dr Leschziner. "That's because as we get older the brain is less good at maintaining sleep. We also spend less time in REM or dreaming sleep," says Stanley. "You get less of the more restorative sleep. This means even if you get the same amount of sleep you always have, you're unlikely to feel as refreshed as you did in your 20s."

That doesn't mean you should put up with very poor sleep. "Cognitive Behavioural Therapy for Insomnia (CBTi) is highly effective and should be the first-line treatment, rather than drugs," says Dr Leschziner.

CBTi involves working with a therapist to change attitudes to sleep, often in conjunction with a strict sleeping routine.

Another common problem is wanting to get up and go to bed very early, he says. "This is a normal shift in our body clock that seems to happen over 70, but it can become extreme, meaning someone is waking up at 3am."

Spending a lot of time indoors may also exacerbate this natural shift, as daylight is key to keeping our internal clock in sync with the 24-hour day.

"My main advice is don't assume that poor sleep is just part of the ageing process," adds Dr Leschziner. "If you are regularly unable to stay awake in the day, this could possibly be part of a sleep disorder or another underlying issue - never assume there's nothing that can be done."