I had insomnia for over a decade and all it took to fix that was just weeks of sleep inducer followed by regular melatoin takes. I assumed it will take some gizmos to do that, but apparently it wasn't. Once you could lock your sleep into the daily pattern---something I could never done by myself for a very long time though, hence sleep inducer---then securing it turns out to be much simpler. Consult your psychiatrist first, of course.
by sleep inducer, you mean sleeping pills? Which one in particular?