Patients suffering from major depression often simultaneously meet the DSM-5 criteria for insomnia. These patients are known to have a lower quality of life and worse treatment outcomes compared to depressed patients without co-occurring insomnia, which leads to higher productivity losses and mental healthcare utilization. However, not a lot of attention is given to these co-morbid symptoms in the usual care for depression at mental healthcare institutions. Furthermore, if insomnia symptoms in this patient group are recognized accurately, practitioners often subscribe sleep medication whilst Cognitive Behavioral Therapy for Insomnia (CBT-I) is the treatment of first choice. The EINSTEIN-study aims to assess the effectiveness and cost-effectiveness of an online CBT-I intervention called i-Sleep for the treatment of insomnia in depressed patients treated at mental healthcare institutions. The intervention consists of 5 sessions and is meant to serve as an addition to the usual care for depression. Potentially facilitating and hindering factors of implementing the CBT-I intervention in daily clinical practice will be determined as well. In total, the aim is to include 175 patients from four mental healthcare institutions throughout the Netherlands. Patients will be randomized to either the control condition (care as usual) or the i-Sleep condition (i-Sleep + care as usual).