The best type of foam depends on the type of sleeper. Memory foam is ideal for side sleepers, whereas firm to medium-firm foam is advised for backsleepers.