A few years ago I used marijuana every night to go to sleep. It really, really screwed my sleep up. I started taking sleeping pills and got hooked on those. Very bad experience. Don't use any of that stuff, period. Even if the marijuana feels like it's working, it interferes with your REM sleep or something like that.
In the end my sleep issues were caused by anxiety disorder. Once I got on medication for that, I didn't have any further issues. Marijuana, sleeping pills, whatever, they're all just masking the symptoms of some other problem.