Insomnia is the inability to reconcile or maintain sleep or the feeling of not having a good night's sleep, resulting in daytime dysfunction. It affects health and the quality of life of patients who suffer from it. However, up to 10%of insomniac patients do not receive an adequate treatment. Insomnia requires an integrated approach, treating the causes or triggers and symptoms, and assessing their impact on the patient. Treatment must be based on strategies of changing behaviour and changes in lifestyle that are associated, and when deemed necessary, pharmacological treatment. The main hypnotics are benzodiazepines and Z drugs or non-benzodiazepine hypnotics, on not finding any evidence of clinically significant differences between the use of one or the other. Both therapeutic groups are effective in the treatment of insomnia in the short term, but there is no evidence on their long-term effectiveness.