When I've had problems sleeping, and / or dreamed alot, it's usually because of something I ate----or, the time at which I ate it. I read alot about it and found-out that I shouldn't eat or drink after, say, 6pm; watch the time, expecially, at which I drink caffeine----even decaffeinated coffee I've learned through "trial-and-error", not to drink after, say, 3pm, or I'll have vivid dreams----same with "spicy".
If I think I'm not going to get to sleep at a time that I like, I begin preparations, early. Like, if I want to get to sleep no later than 11, I start no later than 9. Also, the thing about not eating after 6pm, I disregard if I'm going to eat something that will help me sleep. I'll eat cereal, or ice cream, or just a piece of bread (or a piece of bread with one piece of cheese, for a half-sandwich) and a glass of milk. The triptophan will usually knock me out at the time I want.