Sometimes it works if you empty all disturbing thoughts from your mind and concentrate on the good before bed. But because dreams often come from things buried so deep you're not even conscious of, this doesn't always work.
Something to try anyhow.
Works in reverse too sometimes if you want to dream about something specific.