See a doctor to rule out serious underlying causes. If there are no serious underlying causes, physical therapy may help. Rest, but don't use a lot of pillows. Try to get your neck and spine in alignment. You might need a pillow or foam pad in the gap between your neck and the bed.
Ice is suggested to cut the inflammation.
Some people get relief from heat but ice is better at first. If you do use heat, use it for 15 to 20 minutes then take a 40 minute or so break. Physical therapy may also be recommended to help strengthen the neck muscles and keep the problem from getting worse. All Concept Communications material is provided for information only and is neither advice nor a substitute for proper medical care. Consult a qualified healthcare professional who understands your particular history for individual concerns.