I have been doing this for awhile, and 75% of the time this works.
If i visualize as im going to sleep i have more dreams, and much more vivid and detailed dreams. The other night i was doing this and it wasnt working because i couldnt go to sleep(my mind had started to go crazy and would not STFU), then i started to breath slow with controlled deep breaths, as i did this my mind calmed down and i started visualizing agian, but this time it was much different and easier. It took another 10(?) minutes before i finally fell asleep and i had a really long and vivid dream about the future, an apocalyptic future where gas was used to power hoverbikes and floating wheelchairs. The gas station that was nearby had gun turrets on every corner of the building because gasoline was a very rare and expensive resource. I didnt have any credits(cash) so i drove my bike in, started pumping in the gas, while waving at the guy inside(this was the custom of the time, because if you dont wave, they shoot), after i saw him look away i jumped on my bike and high-tailed it out of there. The bike hovered by using 8 little nozzles that came off at 45° angles in a circular pattern from underneath, there were two large nozzles in the back for forward propulsion(pointed straight back placed on a swiveling shafts so you could point them up or side to side to turn) with two smaller nozzles pointed in the opposite direction(those were the retro-rockets). It also had navigation nozzles on each side so you could "slide" from side to side or correct yourself without having to actually turn. Anyway i went off as fast as i could and had to dodge the gun turrets before i could get back to the garage place i was at before. When i got back there i inspected the bike(because i realised it was a dream at this point and i wanted to see if i could get any ideas about this when i woke up). It was an amazing dream that prompted me to start doing this more often, and to started writing a book based on it.
For whatever reason, when you visualise before you fall asleep it activates parts of your brain that allow you to remember your dreams more easily and with much more clarity. Out of the 12 times ive down this 9 times it worked.
Interestingly enough i had four dreams about the same apocalyptic future, one that brought to light a very deep meaning about my own personality, one about an underground bunker where the hoverbikes were being studied(because of whatever caused the apocalypse all the information on how the hoverbikes were mass produced were gone, and the scientists of the age were simply trying to re-invent the wheel so to speak by taking them apart and trying to find out how the materials were manufactured), one about being a governement police officer(there were no court systems, the cops were as corrupt as they get, and because of overpopulation cops were encouraged to kill anyone who so as much j-walked).
hopefully this will help some of you who have trouble getting good sleep and in the least explain the chaotic world of dreams.