Acoustic foams, and the foams common to foam mattresses, including memory foam, are not the same.
While I suspect, if applied smartly (i.e. with some basic understanding of Acoustic Principles and Absorption, one may be able to attenuate some frequencies to some degree, but to what extent?)
Too many people go willy-nilly into treating their rooms with little to no understanding of what they are doing. Most don't realize the harm they are doing until much later. I've seen many posts in various fora now where people have discarded most of their room treatments to the betterment of SQ.
Learn about Acoustics first, if you want to do yourself any favors.
Master Handbook of Acoustics, Sixth Edition [Everest, F. Alton] on Amazon.com. *FREE* shipping on qualifying offers. Master Handbook of Acoustics, Sixth Edition
www.amazon.com