No, it is not recommended to use a washing machine to clean a memory foam mattress as it can damage the foam. Instead, spot-clean stains with a cleaning solution using lukewarm water and a damp cloth.