A quilting machine has at least one needle and looper set for forming chain-stitched patterns on a thick multilayered material such as a mattress ticking, preferably a panel of the continuous web clamped stationary on a frame. The stitch forming elements are mounted on separate heads that move independently transversely relative to the panel on a bridge that moves longitudinally relative to the panel. The bridge is longitudinally moved by a servo and the heads are transversely moved on the bridge by separate linear servos. The needle and looper are each driven by a linear servo having an armature to which the element is directly fixed to reciprocate without intervening mechanical linkage assemblies. A controller drives the servos to chain-stitch patterns, differentially move the heads transversely to account for transverse needle deflection and to phase the needle and looper to compensate for longitudinal needle deflection. The controller determines or predicts needle deflection, either based on stored empirically determined data or optical sensing, and generates deflection compensation signals to drive the servos.