What does it mean if my left shoulder and my neck hurts after sleeping on them?

Usually nothing. This is very common. It is often just a simple strain of the muscles and nothing serious in the majority of cases. It will typically go away without anyt treatment. If it does not go away after several days or a couple of weeks, a visit to your doctor would be recommended.