This is a bit complicated because it involves both positive and negative effects. Marijuana may disturb the sleep cycle by interrupting the later stages of REM sleep.
However, people who suffer from serious nightmares, especially patients with PTSD, this can be helpful. Nightmares and other dreams occur during those same stages of sleep.
By interrupting REM sleep, many of those dreams may not occur. Research using a synthetic cannabinoid, like THC, showed a decrease in the number of nightmares in patients with PTSD.
Marijuana maybe a better sleep aid than some other medications or even alcohol because the latter two may potentially have worse effects on sleep, though more research is needed on the topic.