Your symptoms seem to be due to cervical spondylitis. If your work involves working on computer for long duration and you sleep with thick pillow, then it's quite likely that you have it. Check for tenderness on your spine in neck area. Also see if you feel feverish and discomfort in ear, it can be due to ear infection.
Next Steps
Avoid working for long duration with your neck bent down, place your computer on table of good height, avoid looking at mobile screen for long periods.
Over the counter pain medications like tablet Diclopara taken twice daily for 4-5 days should solve your problem.
Health Tips
Ice fomentation of neck will also help you with it.