Insomnia due to mental disorders: accounting for more than 40% of insomnia, including: insomnia due to psychosis, insomnia due to mood disorders, insomnia due to anxiety disorders, insomnia due to panic disorders, insomnia due to alcoholism, etc. Insomnia due to depression and anxiety disorders: It is relatively common in young and middle-aged people and is more common in women. Family history is a risk factor, and more than 90% of depressed patients will have insomnia at some point. Insomnia is often the precursor or first symptom of depressive disorders; it often improves after antidepressant treatment before the depression subsides; it tends to be worse in older patients and in those with severe depression. Anxiety patients are almost always accompanied by insomnia, and generalized anxiety disorder is often chronic and prolonged. It can lead to sedative drug and alcohol abuse and dependence.