Memory foam mattresses are excellent if you want a mattress that won't retain body impressions. While the foam surface is quick to mold to your body, well-made memory foam is just as quick at snapping back into shape.
However, when it comes to durable resilience, it's difficult to beat the potential of latex foam. The buoyant material can withstand wear and tear well enough that it can retain its shape after decades of use.