Solid memory foam should not go in a washer or dryer.
Agitation can tear foam and retained moisture can cause mildew.