Mattress foam comes in multiple different types: memory foam, polyurethane, and latex. Memory foam is a type of polyurethane foam that has lower resistance so it reacts and slowly reforms when pressure is released. It generally makes up the surface layers of a mattress.
Polyurethane comes in multiple different forms - making it useful in the middle and base layers of many foam and memory foam mattresses.
Latex is the natural alternative to memory foam and polyurethane foams. It is created from sap from a rubber tree and is treated to create different densities to cover both soft and firm requirements. Like rubber, it is highly responsive and has a bounce that some sleepers love and some others hate.
Pros: Depending on the foam type, it can be quite comfortable, safe, and responsive.
Cons: Lower quality foams can break down quickly, causing sagging issues within only a few months or years.
Gel is a recent newcomer to the mattress space. It is being used as both a standalone layer and an infusion into foam. Gel benefits mattresses by retaining less heat than memory foam. Also, newer gels compete against memory foam by being more responsive and less toxic.
Gel is similar to foam because it is a polymer made by blending plastics and other chemicals.
Because of gel's heat diffusing properties, it is generally found in the top layer of the mattress under the cover.
Pros: Cooler sleeping surface vs memory foam. More responsive feel when not combined with foam.
Cons: Similar to foam, it is a synthetic blend of chemicals.