Sharp pain turning sides at night

I experienced the worst pain while flipping to my otherwise in bed last night. I assume something was just over stretched