According to WebMD, a memory foam mattress topper is made from viscoelastic foam. This foam is noted for its ability to deform under heat and pressure and regain its original shape when the pressure is removed. The foam was originally developed by NASA in the 1960s for aerospace uses.
Typically, a memory foam mattress topper will contain a slab of memory foam 2 or 3 inches thick. This allows the foam to mold to the body while a person sleeps and adds softness and support to the mattresses. The firmness of the foam depends on its density. Heavier foams offer more support, but lighter foams conform more completely to a person's contours.