Greetings, the current problems is no way related to mattress. Whichever mattress she is comfortable use it. All you have to do is make her flexible. Lying down more than she use to due to surgery made her less flexible and hence pain.
Next Steps
massage the back thigh and upper back along with ice. this will relief pain upto 30%. get a physio visit her at home and start an exercise program (stretching and strength training) and in 3 days all pain will resolve. but continue physio program for next 3 months supervised by physio for long-term benefits.
Health Tips
if any questions do let me know.