How to Get Rid of Armpit Stains and Sweat Stains
Sweat stains often appear on clothing, bedding, and other fabrics, but you can remove them without fuss. Using everyday items like detergent, hydrogen peroxide, and baking soda, you can effectively tackle those unsightly armpit stains that cause yellowing or darkening. There's no need for special stain removers or harsh chemicals when dealing with discoloration on shirts, sheets, pillowcases, and hats. Just steer clear of chlorine bleach , as it can worsen stains due to a reaction with sweat minerals.

Why Does Sweat Leave Stains?
Sweat contains high concentrations of salt and other minerals from our bodies. When it soaks into the fabric of clothing, bedding, and even pillowcases, this can change the color of the material . When your clothes have sweat stains around the underarms , this is due to the combination of the minerals in your sweat mixed with the ingredients in antiperspirant or deodorant (primarily aluminum).
Source: https://www.thespruce.com/prevent-and-remove-sweat-stains-1900316