I’ve long suspected marijuana has a similar effect, in that it “helps” you fall asleep by making it harder to remember the process of falling asleep. It’s widely known that marijuana inhibits short term memory formation. (I could be wildly off base)
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.