Thanks for your question.
You have injured your shoulder muscle tendons while sleeping ( muscle sprain).
It is likely bicipital tendonitis.
The best course of action: continue applying ice, avoiding lifting & weight bearing on the affected side, take ibuprofen 800 mg 3 times a day.
You can also take a muscle relaxant flexeril 10 mg twice a day along with the above regimen.
The healing process will take atleast 1 week.
If not better in a week, then see a orthopedic surgeon.