Less sleep, mood disorders trigger nightmares