I wouldn't assume that's true.
Some folks, sure.
Or it can also depend on the strain of weed or how it's delivered, or when it's used.
Other folks - it only causes anxiety, increased heart rate, paranoia, *mild* hallucinations, etc. It still may help someone sleep who experiences those effects but otherwise attempting to go about life that way would be worse.
If my anxiety was high or something was bothering me, I would NEVER try to treat it with MJ - that'd be a freakin joke, 100% backwards from anything that'd help. Exercise, sure. A few drinks, sure. And there are a zillion prescription drugs out there that I bet would do it too. But definitely not MJ.