We are assuming from what you wrote that perhaps you had an avulsion injury to the hamstring muscle with either a partial or complete tearing of the tendon where it attaches to the bone.
Since you mentioned painful sitting, it’s probably safe for us to also assume the tendon pulled away from the bone where it normally attaches to the ischial tuberosity. The ischial tuberosity is the bump on the bottom of the pelvic bone where your bottom rests when sitting. Some people refer to this area as their “sit bones.”
From the description of your symptoms, you may be experiencing sciatic neuralgia. The sciatic nerve is a large nerve that starts in the low back and goes down the back of the leg from hip to foot. It can be irritated or injured when it is pulled out of the way to repair the torn hamstring tendon. In the normal process of healing, scar tissue can form around the sciatic, too. Either (and often both) of these situations contribute to sciatic neuralgia.
The incision made over the ischial tuberosity to perform a hamstring repair is a common cause of painful sitting. Over half of all patients who have this repair procedure still report these kinds of symptoms a full year after the surgery.
There are some ways to approach this problem. You will want to consult with your surgeon for the best treatment for your situation. Treatment may start with analgesics (pain relievers) and physical therapy.
The therapist can help you change your posture as malalignment might be contributing to the problem. Stretching the piriformis muscle around the sciatic nerve often helps. The therapist can also take you through a series of movements that will mobilize (move, slide, and glide) the sciatic nerve.
The therapist guides you through these steps, but in some cases, the painful symptoms persist. Other more invasive procedures can be tried. For example, the surgeon may try injecting a numbing agent around the nerve. Sometimes even a short period without pain helps “reset” the nervous system.
In order to determine the best treatment for you, see your surgeon. This may be something that just requires more time for healing to take place. But at least you can get some help with the painful symptoms and keep the problem from getting worse while you wait for completion of the recovery process.