been up all night

Kind of a pro at not sleeping. You mentioned shoulder pain, pain itself will keep you awake. Which Oxy are you taking, oxycontin, which is the extended release one or oxycodone which is the immediate release one. Oxycontin was given to me to help manage the constant chronic pain. The oxycodone is to help with the breakthrough, higher than normal pain. Which sleeping pill?? Overtime your body will build up a tolerance to most sleeping pills. Lunesta and Ambien, after 3 days or so have little to no effect on me, other than a fog the next morning. Xanax works for me, sometimes. It is an anti anxiety drug and it can be addiciting. .5mg is enough to help me sleep again now that I have not taken it for a year or so. When I was on it before 1mg was enough to induce a fog type of sleep, 1.5 would knock me out. But the next day my body would wake up but my brain never made it past semi-comatose.
How long has your shoulder hurt? How long has the sleep problem been around? Chronic pain will cause depression, as well as chronic sleep troubles. Once the depression settles in that is when the real fun begins. Good luck...