Carpet beetles and memory foam mattress
I checked with a specialist in the Entomology department at North Carolina State University and this is his response to the questions. "Live" is kind of a difficult term to define. The beetles can't feed on the foam (or at least they can't derive any nutrition from it). However, if you simply had it laying on top of a mattress, it wouldn't entirely surprise me if the larvae crawled into the gap between the foam and the mattress. The specialist suggested that steam cleaning would certainly be an option. It would be helpful to vacuum as well. Also, check to see if it can be cleaned with soap and water and simply allowed to dry.