Thanks for your question on Health Care Magic.
I can understand your concern.
By your history and description, possibility of musculoskeletal injury due to twisting in bed and heavy coughing is more.
But better to get done chest
x ray to rule out internal
lung injury because you are still having pain and painful breathing.
If chest x ray is normal then no need to worry for major lung injury.
Musculoskeletal pain is more likely in your case.
So avoid bad postures in sleep. Avoid heavyweight lifting and strenuous exercise.
Avoid movements causing pain.
Start painkiller and
muscle relaxant. Apply warm water pad on affected areas.
Wear chest belt to prevent mobilisation of painful areas. Don't worry you will be alright.
Hope I have solved your query.
Wish you good health. Thanks.