Consult an orthopaedic surgeon in meanwhile start hot pack on affected area .don't do any exercises until pain is half of intensity as it may increase pain due to muscle spasm. Can also take help of pain killer. When pain is relieved start mild stretching exercise and also isometric cervical exercises.
Next Steps
correct your posture while sitting and lying.
Health Tips
use soft and comfortable pillow maintain correct posture while sleeping