When you work out your muscles produce metabolic waste which can cause some of that pain, stretching the muscle helps increase the flow of blood and lymph, the metabolic waste (such as lactic acid) is then disposed of via the lymphatic system, while blood flow is increased, increased blood flow brings additional oxygen and minerals stimulating natural healing. Well done for your efforts!
Edit – a word
Latest Answers