Like everything else on a bike, there is some maintenance associated with your helmet. The pads are designed to sop-up sweat and not grind the salt into your scalp when it evaporates. (essentially, to keep them dry, you'd need to not sweat...) If you try to keep them dry with head-coverings... you are just spreading the wetness around. Not saying that won't improve your comfort, but it probably won't keep the pads dryer or your helmet cleaner.
Giro, one popular helmet maker, recommends cleaning your helmet with a soft cloth, warm water, and mild soap. They also recommend getting a new helmet every 3 years. Although, the last helmet I retired was 10 years old... and that was due to mishandling. Any significant impact to the helmet or any automobile collision would also be reason to replace the helmet.
This periodic washing includes the pads and straps. In practice, I rinse mine out after every ride and give the pads a little mash with my thumb to run the water out as best I can. (I sweat a LOT, even in winter). It is usually dry in 2-3 hrs, but I can grab it before then and head out anyway. Occasionally, I'll use the soap, maybe once a month or so... you'll know when to do it.
However, sometimes the helmet gets funky... I forget or can't rinse it good enough, or I leave it so that the water can't drain from it... whatever the reason... Once you get to this point you have two choices:
1. Replace the pads (For giro, you can call/email them or go to the LBS/dealer:1-800-456-2355/giro-consumersupport@giro.com)
2. Vinegar-rinse (apple cider vinegar--ACV). I'm sure other mild bactericides will work too, but I keep ACV for other purposes, so it is handy. Then let the pads dry... then do the warm-soapy to get the Vinegar out. (This is what will usually save me...)
We have to be careful cleaning helmets as the adhesives and other materials used in their construction are often sensitive to things like degreasers, bleach, and even Isopropyl alcohol (IUPAC name propan-2-ol, also called isopropanol or dimethyl carbinol,alcohol).