To remove any lingering unpleasant odors from memory foam, sprinkle the surface with baking soda. Allow it to sit for up to 24 hours before using a powerful handheld vacuum to clean it up. If the odor still persists, flip the mattress and topper over and repeat on the other side.