So, during exercise the combination of your shirt rubbing, a heightened physiological response (increased heart rate and blood flow), and cooler temperatures from the air conditioning in the gym can potentially cause your nipples to become erect.