The foam type in your mattress and the thickness will affect how hot it sleeps.
Latex foam generally sleeps cooler than any type of memory foam. So very hot sleepers should consider latex. Even if a memory foam is “infused” with gel or something else, it will still sleep warmer than latex.
If you do choose a memory foam, the thickness will also matter. Thickness affects softness. The thicker the comfort layers, generally the softer the mattress will become. The softer the mattress, the more your body sinks in and is engulfed by the mattress. This will result in sleeping hotter.