I imagine them directing the worm towards solid ground, which forces the worm to come to a stop, then they jump and leg it before the worm executes a turn around. Or the worm doesn't come to a stop, crashes into the solid ground and they all go flying off the front. Then they leg it before the worm wakes up form the concussion.
They tire the worm out until the point where it won’t go any further above ground. The worm just sits there and waits until the Fremen take out their hooks. That’s also how they steer the worms. The hooks the Fremen use pry apart the worm’s ring segments; the worm naturally wants to protect its more delicate innards, so it turns that part of its body as far away from the sand as possible. It’s a little bit like motorcycle or bicycle counter-steering: if you want to turn right then the Fremen “pilot” leans to right in order to pull the left-hand hook harder, the worm turns itself to the right in order to lift the more exposed portion of its body higher away from the sand. IIRC… getting off any worm is fraught with danger, even one that’s been ridden until the point of exhaustion. Yes, I may have read the books a “few” times…