The incision for the hysterectomy is quite low just above the groin and the different layers of the abdomen are cut to enter into the abdomen.
The Incision will take some time to heal and the muscles will be sore for this period. Since these muscles are attached to the bone just under the groin, groin region can be sore too for this period. That would explain the pain while moving your legs and passing stools. Both these activities involves lower abdominal muscle contraction and this can cause pain if they are still recovering from a recent surgery.
Usually it can take 4- 6 weeks to heal primarily, but complete healing can take up to 3 months. It may not be painful for whole of this period, but the time range would be within this period only.Since its not even a month after the surgery , this could be very well surgical pain due to the healing abdominal wound.
Don't restrict your daily activities due to this , try light exercises and walking. If it is bothering you; you can always a have a dose of pain killer like tylenol or motrin.Bladder
is somewhat inflamed after hysterectomy due to its proximity and can cause burning and pain.Try to drink plenty of water, and cranberry juices.If the burning persist you should get urine tested for infection.
Urine infection usually causes pain in the center of the lower abdomen and is not related to leg or bowel movements.
I assume this clarifies your doubt regarding the issue you have.If you still have any doubts, please let me know.