While it is not completely clear why the snakes do this (speculations range from predator avoidance to hunting) recent studies have made great strides in understanding how.
You would not initially believe that the tube-like body of a snake would be capable of gliding. However, Professor Socha from Virginia Tech in Blacksburg notes that "as it jumps, it flattens out from just behind the head to where the tail starts. What it is doing is taking its ribs and rotating them forwards toward the head and upwards towards the spine." This radically changes its body shape, doubling its width and produces a unique concave structure, which the snake shapes into an S, giving it tremendous lift. "It looks like someone's version of a UFO," he said.
Socha and his colleagues took these observations further by producing a 3D printed rod that replicated the paradise tree snake during "flight" and placing it in a tank filled with flowing water. "The water flowed over it [the rod] and we measured the forces on the model and we visualized the flow movement in the water using lasers and high speed cameras" said Socha.