That's exactly the kind of thing you should discuss with a doctor. None of us know what happened to you, what kind of injury you have, or why it hurts. And the fact that it even hurts when you turn over in your sleep would honestly worry me. Good clinics like
https://nwrehab.ca/physiotherapy/ always start with an examination. At the first appointment, they assess your condition and then put together a personalized treatment plan. After that evaluation, the physiotherapist can usually give you a rough idea of how many sessions you'll need and how long the whole rehab program might take. If everything goes well, the plan can be adjusted, shortened, and all that. But yeah, those are things you should only discuss with a doctor.