This is mostly due to muscle spasms which is mainly due to excess stress on the neck muscles due to abnormal posture like while working on computer or mobile, excessive driving, studying for long hours or abnormal sleeping position
Next Steps
get a xray cervical spine done
Health Tips
avoid very soft pillows, keep nech straight while reading, working on computer, consult me or any other doctor online or in person