If you have trouble getting to sleep, staying asleep or sleeping for long enough, you may have insomnia. This is a common problem and can be caused by many things. However, there are things you can do to help improve your sleep and there are treatments available if you need them.

Key points

  1. Insomnia has short-term effects, such as reducing your performance at work and being at risk of accidents. Over time, it can also affect your health and mood.
  2. Although the amount of sleep needed varies by person and age, for most adults about 7–9 hours is recommended.
  3. Insomnia often starts in a time of stress and passes when the stress does. However, other things can cause insomnia, including use of alcohol, caffeine and nicotine, mental health issues, other sleep problems, other health conditions and some medications.
  4. There are lots of things you can do to help overcome insomnia, including developing good sleep hygiene, having cognitive behavioural therapy, using sleep apps and, in some cases, medication. 

What is insomnia?

Definitions of insomnia vary but, generally, it means:

  • difficulty getting to sleep
  • difficulty staying asleep (poor sleep quality) and/or
  • waking much too early.

Why is insomnia a problem?

If you have insomnia, you will not be getting enough good quality sleep and you will be affected by tiredness during the daytime. This can lead to poor performance at work and an increased risk of accidents, such as when you are driving or at work. It also makes it harder for you to concentrate, remember things, make decisions and solve difficult problems.

Lack of sleep over many months or years can also affect your health and your mood. It can increase your risk of depression, anxiety, heart disease, high blood pressure and diabetes.

The good news is that there are things to help you sleep and reduce your risk of being affected by problems caused by insomnia.

How much sleep do I need?

The recommended amount of sleep for an adult is between 7–9 hours. The amount of sleep you need varies depending on your age and what else is happening in your life, but if you wake up feeling refreshed and can function well throughout the day then you're getting enough sleep. Read more about how much sleep is enough

What causes insomnia?

Often insomnia starts in a time of stress and passes when the stress does. However, many other things can cause insomnia.

  Common causes of insomnia:

Some people have insomnia without any of these issues or conditions – this is called primary insomnia.

How is insomnia treated?

Insomnia often goes away on its own, but it's important to talk to your doctor if your sleep problems continue. Your doctor will talk to you about your sleep patterns, your lifestyle and any causes of stress so they can work out what might be causing your sleep problems. Some people may be referred to a sleep clinic.

Sleep hygiene

'Sleep hygiene' refers to your lifestyle and your bedtime environment that may make it easier or harder to get better quality sleep. Changes you can make to improve your sleep hygiene include:

  • going to bed at the same time every night – this will help set your biological clock so you start to feel drowsy at bedtime
  • creating your own bedtime ritual, eg, writing down the things on your mind that are worrying you or that you need to do tomorrow, reading a book, making a hot, milky drink or taking a warm bath – start your ritual at the same time each night
  • reducing or avoiding caffeine, cigarettes and alcohol, especially in the evenings
  • avoiding large meals late in the evening – but don’t go to bed hungry (have a late snack if you need to)
  • exercising outdoors early or in the middle of the day (but not too close to your bedtime)
  • avoiding TV, computer screens and mobile phones for an hour or two before bed as the artificial light interferes with your natural cues to sleep
  • unwinding before bed by reading or listening to music
  • ensuring your bed is not used for work or catching up on social media
  • making sure your bedroom is cool, dimly lit or dark and as quiet and comfortable for sleep as possible
  • turning around any bedroom clocks – clock-watching makes insomnia worse.

Read more about tips to improve your sleeping habits

Cognitive behavioural therapy for insomnia (CBTi)

If you are feeling anxious about your sleep it may be useful to see a sleep psychologist, as worrying about your sleep can make your sleep problems worse. A type of short-term counseling called cognitive behavioral therapy (CBT) can help you to control worries, anxiety and negative thoughts that keep you awake. A special form of CBT that focuses on insomnia, called CBTi, helps you learn how to calm your mind when you’re trying to sleep. 

Sleep apps

There are a variety of sleep apps available for use on your smartphone or tablet that can be helpful if you have insomnia. Some apps track your sleep habits, similar to a sleep diary, to help you develop good sleep routines. Other apps help you to fall asleep by using calming visual graphics and relaxing music. Two apps use the CBTi approach: Sleepio (free) and SHUTi (which has a cost).


Medicines for managing sleep problems are usually only considered when lifestyle changes (sleep hygiene) or CBTi have been unsuccessful.
Medicines for sleep problems may be effective in the short term but there is no evidence of long-term efficacy or safety. 

Medications for insomnia include sleeping tablets (also called hypnotics), over-the-counter sleeping tablets and melatonin. Other supplements are also used for insomnia, but the evidence that these are effective is either limited or does not exist.

Read more about medicines for sleep problems

Learn more

10 tips to beat insomnia  NHS, UK
Common sleep problems  in 13 languages, Health Information Translations
Tips for getting a good night's sleep Here to Help, Canada


  1. Melatonin: is it worth losing any sleep over? BPAC, August 2015
  2. Overuse of benzodiazepines: still an issue? BPAC, February 2015
  3. Insomnia treatment in New Zealand NZMJ, 2012;125:1349
  4. Melatonin SafeRx
  5. Guidance on the use of zaleplon, zolpidem and zopiclone for the short-term management of insomnia NICE, 2004

Reviewed by

Angela is a pharmacist in the Quality Use of Medicines Team at Waitematā District Health Board. She has experience in hospital pharmacy in New Zealand and in the UK, and was previously a medical writer for Elsevier in The Netherlands. Angela is interested in promoting the safe use of medicines, particularly high-risk medicines.
Credits: Health Navigator Editorial Team. Last reviewed: 19 Sep 2017