If you are having trouble sleeping because of neck pain, you can try using a heating pad to loosen the muscles, or you can take an over-the-counter pain reliever. You can also try gentle stretches or massage therapy to loosen the muscles. A pain-relieving cream or gel, such as Emuaid, may also be helpful. If the pain does not improve after a few days, be sure to see your doctor.