Select your mesh surface and type “squish” in the command line. It will flatten it out using a basic approach.
Since flat soft material will not conform to the inside of the helmet, you will also need to make seams in the mesh to get it to “relax” into the flattest form.
These are called gores or darts, depending on the specific application:
Gores - Wedge-shaped sections or panels that create curvature when assembled. Common in spherical or dome-like constructions (parasols, hot air balloons, skullcaps). Each gore is a tapered segment that fits together with others to form the 3D shape.
Darts - Triangular or wedge-shaped tucks/cuts used to remove excess material and shape flat fabric to curves. More common in garment construction where the wedge is folded and sewn rather than removed entirely.
In helmet liner patterns and similar applications where flat material must conform to compound curves, “gores” is the standard term. The number and angle of gores determines how closely the flat pattern approximates the target surface - more gores = smoother approximation but more seams.
Start here for the deeper understanding of the Squish command.