Whether you use a memory foam pillow or a standard fill type of pillow, one thing is for sure: that thing gets nasty. Between the sweat, the stray pieces of ear wax, dandruff, dead skin cells, food crumbs, and the dust mites, your pillow is a wasteland of grossness if you don't clean it on a regular basis.
Cleaning A Memory Foam Pillow
What you need to know first is that you should never put your memory foam pillow in the washer. The reason for this is that for solid memory foam pillows, the final spin cycle is too rough on the pillow and will likely break the foam. This will result in a ruined pillow, which I'm sure isn't what you want. The cover, if it comes with one, is something that can be put in the washer.
If you want to wash the entire pillow, you need some gentle, dye-free detergent. Dilute some of the detergent in a sink full of lukewarm water and soak the pillow in it. Slosh it around a bit and make sure that it's completely soaked with the cleaning solution you've made.
Rinsing Is Simple
When you get ready to rinse a solid memory foam pillow, you'll need to do several changes of water and squeeze the cleaner out until the water is clear. Don't twist or wring it, you'll break the foam!
With a shredded memory foam pillow, it's a little different. You can twist and wring it some if you like without having to worry about breaking anything, but squeezing only is still best.
How To Dry A Memory Foam Pillow
You want to leave it in an area that's well ventilated; a fan may help. Whatever you do, don't put a solid memory foam in the dryer for the same reason I mentioned for not putting it in the washer. The cycle may be too tough and could damage the pillow.
If you need to dry a shredded memory foam pillow, you should be able to do that in the dryer with no ill effects because you don't have to worry about the foam breaking or cracking. Run the heat on low, however; high heat could potentially damage the foam.
If you've run into dust mite issues, there is a completely different method to follow after standard care, and the same goes for bed bugs with memory foam and just general infestations. You need to follow different cleaning and prevention rules when dealing with parasitic pest.