Insomnia and anxiety symptoms are independent clinical variables involved in suicidal ideation in psychiatric inpatients. In this article, we investigated the relationship among insomnia severity, severity of anxiety symptoms, and suicidal ideation in a sample of psychiatric inpatients with severe mental disorders. We used a mediation model considering insomnia severity as the possible mediator of the relationship between anxiety severity and suicidal ideation. We administered the Columbia Suicide Severity Rating Scale, the Insomnia Severity Index, and the Hamilton Anxiety Rating Scale to 116 consecutive inpatients to the psychiatric unit of Sant’Andrea Hospital in Rome. The effect of anxiety symptoms was mediated by insomnia severity; patients who perceive higher anxiety symptoms were more likely to experience higher levels of insomnia and, thus, higher suicidal ideation intensity. Results showed the importance of assessing and treating both insomnia and anxiety in clinical practice.