yes, as previously mentioned... be sure nothing is seriously wrong... Doctor!
I occasionally run into this on a ride, stretching as also mentioned earlier during the ride... and doing neck stretches daily for a few minutes when not riding helps a lot in my case.