They’re all equivalent in meaning and can be used in any context. They differ grammatically in that ‘to exercise’ uses the infinitive form of the verb, ‘for exercise’ uses the noun, and ‘for exercising’ uses the noun derived from the verb [the gerund].