The amount of sleep that you need changes as you get older. Babies and young children tend to sleep the most and to sleep during the day. Adolescents may require eight or nine hours of sleep each night. Older people tend to require only about seven hours or less.

Insomnia is usually defined as having a persistent sleep problem that is not due to any obvious physical disorder but that causes some of the symptoms already mentioned. Around 5% of people experience insomnia at any one time.

There is a difference between primary insomnia and secondary insomnia. Primary insomnia is a problem in itself; secondary insomnia is insomnia that occurs because of another problem.

What causes primary insomnia?

Primary insomnia may be caused by the following:

Use of psychotropic drugs: these mainly comprise stimulants such as caffeine, nicotine, and certain recreational drugs – amphetamines and cocaine, for example. Alcohol, however, may also induce insomnia. This is because although alcohol makes you sleepy initially, it is a stimulant and when the effects of alcohol wear off, you are very wakeful. Certain antibiotics can also cause insomnia.

Misuse of sleeping tablets: the logic here is the same as that of alcohol. The more you take them, the more you depend on them; so, again, when their effects wear off, you wake up.

Hormonal abnormality: this especially applies to hypocretins. These are hormones involved in the sleep–wake cycle. If you don’t have enough of them, you have trouble sleeping. Hypocretin deficiency is especially associated with narcolepsy – a condition associated with falling asleep during the day, but not sleeping enough at night.

Lifestyle factors: these include lack of, or inappropriate, exercise; poor diet; lack of sunlight; noise; dehydration; frequent long haul plane journeys; and habitually disrupted sleep, as is common in shift workers.

Lifestyle factors are easily overlooked. Physical exercise, for instance, is generally healthy, but vigorous physical exercise in the evening may confuse the body and may cause insomnia. For this reason, athletes are prone to insomnia.

Similarly, late night TV watching or playing computer games, especially when in bed, can disrupt sleep patterns. It’s also important to avoid diuretics such as coffee or alcohol immediately before bedtime; you may have disturbed sleep because of dehydration. It’s best to have a glass of water before you go to bed.

What causes secondary insomnia?

There are many causes, including:

Pain: this is self-evident. If you are uncomfortable, you’ll have difficulty getting to sleep.

Hormonal changes: these especially apply to women. Insomnia may fluctuate according to the menstrual cycle. It may also co-occur with the menopause.

Related sleep disorders: these are diverse, and include sleep apnoea, or loss of breath when asleep; night terrors; sleepwalking; and narcolepsy.

What to do if you have insomnia

It is important to lead an otherwise healthy lifestyle. Make sure you are eating enough; anorexia is associated with sleep disorders. Don’t, however, eat large meals prior to going to bed. Similarly, try to exercise each day. Walking two to four miles each day in the sunlight is a simple but very effective measure for someone who has insomnia.

Other simple lifestyle changes include the following:

Keep regular sleeping habits: go to bed at roughly the same time each night, and get up at roughly the same time each morning. Try not to have naps during the day.

Relax: use relaxation techniques, especially before going to bed.

Avoid diuretics and stimulants in the evening: try not to smoke tobacco or drink coffee or alcohol in the 6 hours prior to going to bed.

Treat your bedroom as a ‘sleep zone’: don’t use your bedroom for leisure activities other than sex.

Don’t ‘clockwatch’ in bed: this may add to your anxiety. Instead, if you can’t get to sleep, get up and return to bed only when you are tired. Paradoxically, trying to stay awake may send you to sleep and trying to get to sleep may keep you awake.

If insomnia seriously affects you, see your GP. Your doctor will want to determine whether your insomnia is secondary, in which event your primary problem will need treatment. Your doctor may also wish to determine whether it is safe for you to drive. Some related sleep disorders mean that driving is not safe.