I am not in the medical profession I just research/write on health topics.
But sweat it self doesn't contain any smell actually. The problem is that bacteria on the surface of our skin combined with warm sweat and you have the perfect breeding ground.
The smell is actually the result of the bacteria multiplying in this very pleasant bacteria hang out spot. (so gross to think about)
Proper hygiene is a must - the deoderant should be applied after your shower before the sweating.
Deoderants actually works by leaving a layer on the skin that cover the area and air and smell do not become a problem.
It really needs to be applied prior to the moisture build up rather than afterwards to be effective.
Shaving underarms helps reduce the bacteria hang outs spots - diluted peroxide can also help remove a heap more than usual bacteria.
Good luck use a safe deoderant though because some of the ingredients are not all that good for your health. Trust me. I have spent time researching some of the hazards associated with many of these products.