Choose your foam type. Elizabeth Scully of Trails.com recommends closed foam, especially PVC-NBR material, because it doesn't absorb moisture and maintains its thickness.
Choose your foam thickness. Choose your degree of thickness based on how much comfort you want and what temperatures you plan to camp in. While hardcore hikers during summer months may choose a 1/4-inch thick pad, you will want at least a 1/2-inch or 1-inch thick pad for winter months. Thicker pads provide more comfort and more insulation but take up extra space in your backpack.
Measure and cut your pad from the piece of foam. Most pads are either full length (a few inches longer than your body height and a few inches wider than your width laying down with your arms at your sides) or 3/4 length (the same width but cut off at the knees). The latter pad will reduce the space required for packing but will not keep your lower legs and feet as warm. Trace your desired dimensions with a yard stick and cut along your drawn lines with a sharp cutting knife or razor.
Pack your pad. You can either roll your pad tightly like a sleeping bag, lashing it closed with a strap, or fold it accordion-style. The latter technique saves space and can provide a convenient and comfortable back pad when hiking with your backpack. To do this, cut your pad widthwise into equal strips just narrow enough to fit into your pack (most packs allow for 10 to 12 inches of width). For instance, a pad measuring 44 inches by 26 inches could be cut into four equal sections measuring 11 inches by 26 inches. Once cut, place the strips together and duct tape the sections together, remembering to flip the pad before duct-taping each new strip together so the mat folds like an accordion. Fold the mat and duct tape the exposed side of each fold.