Pulled muscle?

When I was sleeping I think stretched and now my abdomen hurts on one side and is swollen. If I did pull a muscle will the baby be okay?