Quick answer: Insomnia can both worsen and reflect mental-health problems, so the underlying issue should be assessed rather than masked indefinitely.
Anxiety and arousal
Worry and physical arousal can delay sleep. CBT-based approaches can address both sleep and anxiety patterns.
Low mood
Persistent early waking, loss of interest or hopelessness should prompt a mental-health review.
Short-term sedation
Sedation does not treat the underlying condition and can add impairment or dependence risk.
Urgent support
Seek urgent help for thoughts of self-harm, severe agitation, confusion or immediate danger.