Rib/Side/Abdomen Pain while Sleeping?

30 weeks with my twins and we just got a brand new mattress which is quite firm, so I’m not sure if this pain/discomfort is a result of too firm of a mattress or twin pregnancy? Last night I kept waking up with pretty significant pain on whatever side I was sleeping on. Just worried I’ve harmed the babies. Have gotten a mattress topper to soften up the surface.

Any reassurance or experiences appreciated!