A lot of time the padding is velcro'd in, so you can take the padding out, wash it, and put it back in the helmet.
A helmet works by absorbing impact, though. I'm not expert and don't claim to be, all I'm saying is that subjecting it to chemicals or unusual stuff may or may not weaken the foam. I'm not sure - really, I'm not. Just a thought - don't know how the foam interacts with cleaning agents.