I'd have to watch a video of someone doing it on a dirt bike, but for a person on a trampoline or similar, the act of tucking your knees in lowers your moment of inertia and allows you to rotate rapidly through your center of mass. This is the same type of thing as a ice skater bringing their arms in.