i wouldn't take ibuprofen to stop inflammation since the inflammation process when being sore is a *good* thing:
it means your muscles are working extra hard on repairing the damage done through the workout and that's what you *want* them to do. it makes you stronger and more prepared for the next workout, and that's what training is all about: get tired and recover to a level that's above your starting level before working out. your body kind of says "i don't want to be so damaged again" and starts to get better prepared for the rigours of gymnastics. and the inflammation is part of this process. (inflammation just means more activity in the muscle tissue; it doesn't mean "ill" or "to be avoided").
personally for my athletes taking huge amounts of magnesium before giong to bed, combined with lots and lots of water and some light exercise (cycling, swimming), easy stretching and sometimes cold water (change heat and cold while taking your shower) helps a lot when they are really sore after a break.