I tried melatonin. It gave me nightmares. Weird, but it was repeatable. So, my 0,02€.
I take melatonin (0.2mg via a spray). It is very effective. Nightmares are a recurring problem for me and other users I know, but can be solved with low doses and a lot of discipline.