Early memory foam mattresses could retain heat at the surface near to your body, resulting in a hot and uncomfortable night’s sleep. Modern memory foam mattresses use gel particles within the matrix to absorb excess heat and radiate it away from the body, making for a cool and restful night.