How long could you manage without sleep? The current record-holder is Randy Gardner, who as a 17-year-old Californian high-school student back in 1964 managed a staggering 265 hours – or 11 days – without so much as a nap.

“I wanted to prove that bad things didn’t happen if you went without sleep,” Gardner explained. In fact, by the time he finally broke the record, Gardner had endured crippling exhaustion, forgetfulness, dizziness, slurred speech and blurred vision. He’d been moody and irritable, and unable to concentrate on the simplest tasks. He’d even experienced hallucinations and delusions (on one occasion, for instance, imagining that he was the legendary San Diego Chargers’ running back Paul Lowe). “We got halfway through the damn thing and I thought, ‘This is tough. I don’t want to do this any more,’ ” Gardner recalled in 2006. “But everybody was looking at me so I couldn’t quit.”

Of course, you don’t need to have made an attempt on Randy Gardner’s record to know that lack of sleep can have some pretty unwelcome consequences. Anyone who has ever had to suffer a sleepless night will know just how disruptive it can be. The following day we’re tired, irritable, a little miserable, and generally out of sorts. And the longer sleep problems go on, the more wretched we feel.

Download the new Independent Premium app Sharing the full story, not just the headlines

The consequences don’t end there. It’s long been known that people with psychological problems such as anxiety, depression, paranoia, bipolar disorder, and attention-deficit hyperactivity disorder (ADHD) don’t sleep well. Until recently, it was assumed their sleep difficulties were a product of the psychological problem. But research suggests that the process may also work in the opposite direction: persistent sleep problems may help cause and exacerbate a number of common mental illnesses.

The clinical definition of insomnia is taking longer than 30 minutes to fall asleep on several nights each week and over at least a month, which causes problems in daytime functioning. One recent Keele University study of more than 2,500 people in Staffordshire found that individuals with insomnia were nearly three times more likely to develop depression over the next 12 months and more than twice as likely to suffer from anxiety. And research in the US has suggested that people with breathing-related sleeping disorders such as sleep apnoea (in which breathing stops for a few seconds) are at greater risk of developing depression – and the worse the sleep problem, the more likely it is that they’ll become depressed.

Disturbed sleep is a well-known early sign of the manic episodes that characterise bipolar disorder (what used to be termed “manic depression”). Now there’s evidence that these sleep problems aren’t simply a symptom of the illness; they can also trigger the manic episodes.

A similar picture emerges from research we carried out recently at the Institute of Psychiatry, King’s College London into the links between insomnia and paranoia. When we assessed 300 members of the general public, we found that those suffering from insomnia were five times more likely to experience strong paranoid thoughts than those who generally slept well. Part of the explanation for this startling statistic, we believe, is that insomnia is helping to cause paranoid thoughts, much as it can do for depression or anxiety.

The link between sleep problems and psychological problems isn’t confined to adults. A |number of studies indicate that children who don’t get enough sleep are prone to the sorts of behavioural problems that can look like the signs of ADHD. Earlier this year Finnish researchers published the results of a study of 280 seven- to eight-year-olds. The children who slept fewer than 7.7 hours a night were more prone to hyperactivity, restlessness, impulsiveness and lack of concentration.

Exactly why lack of sleep can have such a profound effect on our psychological and emotional well-being is a question that scientists are just beginning to tackle. But one key factor may be that when we don’t get enough sleep, the part of the brain behind our foreheads that controls our thoughts, behaviours and emotions (the prefrontal lobe) doesn’t function efficiently. Our rational mind, the executive centre that keeps us on an even keel, is overwhelmed by our feelings, no matter how negative.

That said, just because you don’t sleep well – and on any given night one in three of us will have difficulties sleeping – it certainly doesn’t mean you’re necessarily going to develop anxiety or depression or indeed any other psychological problem. In most cases, sleep problems are just one among several contributory factors.

Nevertheless, the message sent by this new research is that persistent sleep problems, once trivialised as merely a symptom by psychologists and psychiatrists, may actually play a key role in determining our mental health. If you can sort out your sleeping, you’ll be reducing the risk of developing psychological and emotional problems. If you’re already battling these problems, better sleep can be a crucial – and non-pharmaceutical – weapon in your armoury.

Happily, there are several tried-and-tested ways to combat sleeplessness. As a first step, exercise every day – it’ll tire you out. Avoid caffeine, alcohol, or nicotine in the evening. Develop a relaxing evening routine – maybe take a warm bath or spend some time reading. Try listening to gentle music or doing a relaxation exercise. Have a bedtime snack, though go for something healthy and relatively plain.

Get your bedroom right for sleep – that means a comfortable bed and a room that’s quiet, dark, and your preferred temperature. Resist the temptation to lie in, and cut out daytime naps – you’ll only find it harder to fall asleep at night. Learn to associate your bed only with sleep, so don’t use it, say, for reading, eating, watching TV, or writing a diary. (Sex is permissible, though.) Only go to bed when you’re very tired and, if you’re not asleep within 20 minutes, get up and do something relaxing for a while.

“Insomnia is like hiccups,” Bob Dylan once commented. “Everybody has a cure but none of them work.” For once the great man is wrong. We can all improve our sleep. And in so doing, we may also be helping to safeguard our mental health.

Daniel Freeman and Jason Freeman are the authors of ‘Know Your Mind: Common Emotional and Psychological Problems and How to Overcome Them’. Daniel Freeman is a Wellcome Trust clinical psychologist at the Institute of Psychiatry, King’s College London. Jason Freeman is a writer and editor.