Swimming is a great form of exercise. However, you don't want to go out and try and swim lengths if you are in pain. What you can do is just go to the pool and move in the water. The beauty of the water is it supports your body whilst you move.
Just try floating initially, it is a great sensation to be held by the water. If you feel you can do a bit more than this then try walking in the pool.
In the initial stages of any form of exercise do less than you think you can, try and keep it in your pain free range.
Don't set yourself a goal. It doesn't matter how many minutes or lengths you do...that will come later. Often the fear of the pain will keep you away from exercising so don't think of it as exercise, think of it as hydrotherapy. Moving is so good for the body, it stretches the soft tissues and mobilizes the joints as well as stimulating the blood supply.
As you are able to move up to swimming more, then make sure you mix up the strokes. Do a length on your front then one on your back or change from breaststroke to sidestroke. Put in rest time either with gentle stretches at the end of the pool or a length skulling on your back.
Initially you may still have some pain on exercising but unless you have had an injury then you are most likely not doing any damage to the tissues. If you are concerned or would like any advice then please contact the practice by email...
Some science stuff:
As well as releasing our bodies swimming stimulates the release of endorphins. Endorphins are naturally occurring hormones that as well as reducing the effect of our stress hormones and promoting muscle relaxation, also helps to stimulate hippocampal neurogenisis. This is growth of new brain cells in a part of the brain that atrophies when the body is under chronic stress.
The Village works