Yes and no. Early memory foam predecessor were more likely to be a problem than today’s memory foam beds. Unfortunately there are still a large number of these mattresses that do not breathe and allow air to circulate freely.
Traditional polyurethane foam by its very nature has a tendency to lock in heat next the body this makes the sleeper hot and can cause perspiration.
Look for memory foam mattresses that are made using an open celled structure.
These types of foams should allow air to flow freely making it sleep cooler than standard foams and older memory foams designed before breatheability was an issue. A variety of memory foam manufactures are building their mattresses using air exchange layers. Often they’re made with convoluted or egg crate and even sculptured foams. They can circulate air better helping to sleep cooler the downside to this method is that they may not last as long causing premature mattress failure.