There are many potential causes of neck pain, and the best way to treat it depends on the underlying cause. Some common causes of neck pain include tension headaches, muscle strains, pinched nerves, and arthritis. In some cases, sleeping on the wrong side of your neck can aggravate an existing condition and cause further pain. If you are experiencing neck pain, it is best to consult with a healthcare professional to determine the underlying cause and receive appropriate treatment.