If the hysterectomy is performed as an open abdominal procedure with a large incision in the abdomen (which in my opinion should be necessary in less than 1% of cases), then the pain can last from one to several weeks.
If the hysterectomy is performed as a minimally invasive procedure, such as a vaginal or laparoscopic hysterectomy, then the abdominal pain should typically last from a few days up to half a week.
I am here referring to pain significant enough to require narcotic pain medication, such as Lortab, Percocet, Vicodin, and the like.
This can also be influenced by an individual's pain tolerance and by variations in surgical technique, even within the category of minimally invasive procedures.
There exist special pre-emptive (one can also think of these as preventive) techniques that surgeons can employ to dramatically reduce or even eliminate postoperative pain, even to the point where a patient doesn't use ANY narcotics even in the first few days after the procedure.
In such cases it is feasible to allow the patient to safely go home the same day.