What I do, is that when the dream starts i immediately grab or touch something(Street lamp, wall, tree etc.). Once I even licked the wall ... But it works, it stabilizes the dream... You can do it from time to time in dream to sustain it. Also you can shout out loud : "Prolong Dream" or "Ommmmmm"(like in meditation). And it's important to have intention, because if you stagnate you will wake up. And yes, do not let your thoughts wander.