I've struggled with this for a while. Some ideas:
1. as has been said, check your bars, height and reach.
2. stretch out your neck and shoulders EARLY in the ride, a couple of times.
3. on harder rides, actively practice shoulder and trap relaxation.
4. Sounds goofy, but - buy glasses with no top frame - this has done wonders for me, not having to crane my head up that extra little bit to see under the frames.