IF you have experienced pain for more than a week I would see a doctor. However, gentle excercise could help if the knot is caused by stress or tension. However, do not do anything that could causes severe pain as you could injure yourself further.
there are many exercises one such exercise is first lie down on your stomach hold your foot with your hands and pull yourself backward. try to sit or stand straight so that your back doesn't pain much. bending exercise forward and backward may help you. if this doesn't work see a orthopaedic.