Hi and welcome to the forum! I am glad that I can help you.
You want to know the cause of the symptoms that you experience.
Individuals may experience pain and stiffness in their neck due to sleeping in a twisted position. They may also experience pain if the vertebrae press over nerves, due to spondylosis, injury or deviation of the spinal column.
According to the data that you described, it is likely that you experience the symptoms due to pressure on the nerves. You may consider having an RTG scan of the cervical column in two directions to exclude possible spondylosis or deviation of the spinal column. You may also need to take analgetics and have physical therapy.
Please keep in mind that I provide medical information only. I am not able to diagnose medical conditions online. Please contact your doctor for further advice and information about diagnosis and treatment options.