It's a sympom of muscle spasm when you work for long on computer or in one single position your neck muscles get fatique and go in spasm which causes pain in movement.it can lead to cervical spondylosis so to be on safe side take physiotherapy session to relax your neck muscles.
Next Steps
avoid excessive sitting outside n one position keep you posture straight don't bend forward,take a few min break while working on system,move around shrugg your shoulders,do neck stretch UpTo pain limit.
Health Tips
while doing work on laptop or system,keep your back straight , elbow support ....if pain is bothering too much take muscle relaxant like mobizox,or myspaz tablet once a day.