Each of us has at least once woken up with a stiff and painful neck.
With the fingers find the painful spot on your neck and use the right hand if the pain on the right side or the left, if it is on the left side of the neck.
With your finger, or fingers (depending on the surface) press the sore spot. The pain then has to be enhanced, but persevering. If you cannot reach it well, use a tennis ball or something else useful instead of your fingers.
Slowly turn your head the opposite way of the stiff side, and then tilt and rotate it diagonally, as if you want to touch your armpit with your beard. Hold for 10 seconds, and then relax.
In this way you strain the stiff muscle and pressing it will gradually relax. Repeat ten times in a row.
You will reduce the unpleasant pain in the neck, but if it repeats definitely visit a specialist to diagnose the cause and give you the treatment to remove the pain in long term.