Chronic migraine (CM) is a debilitating condition that places a direct burden worth £150 million on the NHS per year. Previous research has shown that insomnia is a risk factor for migraines. The investigators hypothesise that two modifiable behaviours explain this relationship between insomnia and migraines: daytime napping and nocturnal light exposure. To cope with the migraines, individuals will nap during the day, reducing the homeostatic drive for sleep at night and delaying sleep onset. This inability to fall asleep potentially increases exposure to evening bright light, delaying the release of the hormone melatonin and reducing sleep quality. Poor sleep in turn is a trigger for migraines, which creates a vicious cycle of migraines and poor sleep. The investigators believe that these behavioural mechanisms are valid targets for treatment and are explicitly addressed in Cognitive Behaviour Therapy for insomnia (CBT-I). Digital versions of CBT-I (dCBT-I) offer a scalable solution to the problem of limited access to CBT-I. This research group has demonstrated the feasibility, acceptability and preliminary efficacy of dCBT-I in an uncontrolled proof-of concept study. Utilising randomised control trial (RCT) methodology, the investigator's aim now is to evaluate the effectiveness of dCBT-I for improving insomnia and migraines in patients with chronic migraines. The second aim is to probe mechanism of change and to test the hypotheses that behavioural markers such as daytime napping and evening light exposure can reduce insomnia symptoms leading to an improvement in migraines. Prior to progressing to a full-scale RCT, the investigators require a feasibility RCT, to refine the methodology. The investigators propose to recruit individuals who meet criteria for CM and insomnia, directly referred from two neurology clinics, who will act as clinical recruiters. Eighty-eight participants will be randomised either to a dCBT-I group or to sleep hygiene education (SHE) control group. The main outcomes are insomnia and migraine days and will be collected at post-treatment, and long-term effects will be assessed at month 6.