This is going to sound unbelievable, but aside from buying the pillow, this happens to me with both shoulders involuntarily. I've had to uncomfortably sleep in a chair for too long, else risking a dislocated shoulder.
Its not easy to get diagnosed but you might want to look it up. My daughter discovered she has it and its been a journey to try and find treatment. But it read like a laundry list of all of these issues she had struggled with her whole life: hyper flexibility, migraines, stomach problems, difficulty gaining weight, etc., it does come with certain heart risks so its not just a live with it in discomfort sort of thing. Its worthwhile to look it up and advocate for yourself if you think you or someone else might.
I kinda learned to sleep on my back, but I hate it. Physical therapy has helped, but I always wind up forgetting to do the exercises at some point. And yeah, I mostly just sleep horribly.