Depends. Depends on if the insomnia is due to stress, psychiatric disorder, a primary sleep disorder, another medical condition, medications or poor sleep hygiene. The best treatment is addressing the reasons for the insomnia. Chronic insomnia is best treated with a behavioral program called cbt. Medications are usually indicated for short term use.