Warm up your body and muscles by stretching your arms and neck. Stay hydrated and constantly drink water during warm-up and into your playing session.
Take a two-minute break for every 20 minutes of playing. This will keep your posture from slumping too much when you play. Guitarists tend to slump over their guitars, especially when sitting down and playing.
Every 40 minutes or so, take a five minute break. Walk around the room, continue drinking water and perform the same stretches you did in warm-up.
Stretch your neck after playing. Be slow and gentle with your stretches. An effective neck stretch involves bringing your ear to one of your shoulders and slowing rotating your neck around your shoulders. Do this for about two minutes.
Stretch your neck and back using two tennis balls dropped in two long socks. Place the two balls on the ground, lying horizontally next to each other. Lie on the balls with the top of your back, each ball resting just below each shoulder blade. Using your legs, rotate your back on the tennis balls, loosening the knots in your upper back and lower neck.