The Atlantic explains why bad dreams can be good.

Even if dreams can’t foretell the future, they seem to expose our shared fascinations. The majority of dreams occur during REM sleep cycles, of which the average person has four or five a night. Eight percent of dreams are about sex, a rate that holds for both women and men—though women are twice as likely as men to have sexual dreams about a public figure, while men are twice as likely to dream about multiple partners.