A memory foam mattress generally takes 24 to 72 hours to expand fully. However, this can vary depending on the mattress brand, the specific memory foam formulation, and room conditions like temperature and humidity.