Don't hurt yourself with self-meds. A family member of mine dealt with severe insomnia by writing a novel, a memoir, then more novels, which she published with small publishers then with Viking. But most of us can't do that well with insomnia. If you can do something, even jigsaw puzzles, that might let natural sleep chemicals take over. It ain't easy, no easy answers. And everyone's different, and at different times.