I got this also. MW ended up telling me off cause I had caused it by not getting help to sit up in early pregnancy. All the ligaments and tendons had of course relaxed off and by me trying to sit up unassisted, I had strained them and pulled a muscle.
It hurt for a long time as well. Coughing and sneezing were agony and I had to literally roll out of bed onto my knees on the floor then get up from there as I couldn't sit up on my own.
Wheatpacks help. Use your arms to sit yourself up, or get someone to help you up, or roll out of bed. If you try to stop using those muscles as much as possible, the pain should get better.