I guess my first question would be if you've had a checkup with a doc to rule out a physical cause . . .
If there is no physical cause, then my best guess, and I am not a med professional, is to say that your body has adapted to this behaviour and it has now become entrenched in you so it has become "natural". If it is a case of a learned behaviour, then you will be able to unlearn it. It will be a process and probably frustrating (I've been through my own) because as much as you hate the behaviour, it is a "comfort zone" in the sense that you are used to it but you can unlearn it . . . .
Often for those of us with anxiety, there will be unique manifestations of physical symptoms depending on our individual experiences and mindsets and what we perceive as the triggers which are usually entrenched in some root causes . . .for that reason, it there is not a physical cause, then ask for a referral to a counselor (not necessarily a psychiatrist) who specializes in working with folks with anxiety related physical symptoms. . . you may have to try a couple to get the right match . . .the counselor will help you manage the triggers causing the physical manifestations and in turn help you identify the root causes . . .
In the meantime perhaps start some gentle stretches, some walking . . . nothing extreme start small . . . and my favourite for muscles is soaking in hot water with Epsom salts . . .I don't think you will find a quick fix, but every little step forward is an accomplishment . . .
So, consider the above but, as always, let us know how you are doing and we will do our best to support you . . .take care, kc