Quite often if I'm riding for longer than about an hour I get a sore neck. I assume that I can make some adjustment to my mountain bike to help prevent or reduce the soreness, but I don't know what. Can anyone help?

EDIT

I think my riding position is more upright than leaned forward, but I couldn't say how much because I don't have a feel for it.