I might be able to shed some light on this. Most riders angle their trunk forward when they ride to distribute their weight centrally on the bike. When leaning the trunk forward the head needs to be tilted back slightly in order to see where you are going. This constant backwards tilt of the head requires the muscles in the back of your neck and parts of your shoulder to be contracted all of the time. This constant contraction of neck and shoulder muscles can often result in pain and over time the muscle tissue can knot causing tightness and headaches.

This has been a problem for me since I started riding seriously. I have quite a long neck and the muscles in my upper body hardly ever get used so I often experience neck and shoulder pain. Before my ride I stretch my neck by putting my hand on the back of my head and pushing into it at various angles. During the ride I tilt my head forward every 10-15 minutes so the muscles at the back of my neck can relax for a bit.

If the muscles in your neck and shoulders become really knotted go get a massage from a sports specialist.