Our findings demonstrate distinct patterns of altered functional connectivity in individuals with MDD, ID, and iMDD compared to healthy controls. These findings contribute to a better understanding of the pathophysiology of depression and insomnia, which could be used as a reference for the diagnosis and treatments of these patients.