Never place a memory foam pillow in the washing machine unless specified, even if the washing machine has an agitator. ... The heat from the dryer can melt the memory foam. Don't wring the pillow— wringing can damage the memory foam. Avoid hot water, since it will set the stain instead of removing it.