Background: Depression is known to be associated with altered cardiovascular variability and increased cardiovascular comorbidity, yet it is unknown whether altered cardiac autonomic function in depression is associated with insomnia, a common symptom comorbid with depression. This study aimed to investigate the long-term diurnal profile of autonomic function as measured by heart rate variability (HRV) in both major depression and primary insomnia patients. Method: A total of 52 non-medicated patients with major depression, 47 non-medicated patients with primary insomnia, and 88 matched controls without insomnia were recruited. Each subject was assessed by means of sleep and mood questionnaires and underwent twenty-four-hour ambulatory electrocardiogram monitoring. Standard HRV analysis and a well-validated complexity measure, multiscale entropy, were applied to comprehensively assess the diurnal profiles of autonomic function and physiologic complexity in our study sample. Results: Compared with the controls, the patients with major depression and those with primary insomnia exhibited significant reductions in parasympathetic-related HRV indices, and this association was mainly driven by the presence of poor sleep. Both groups of patients also exhibited significant reductions in physiologic complexity during the sleep period as compared with the healthy controls. Alterations in HRV indices were correlated with perceived sleep questionnaire scores but not with depression scales. Conclusions: Our findings suggest a pivotal role of sleep disturbance in regulating cardiovascular variability in major depression and primary insomnia patients. These findings could highlight the importance of treating insomnia as an independent disease rather than a symptom. (C) 2010 Elsevier B.V. All rights reserved.