Life and it's coincidences....
I say this because, I just saw this recent post now, when for the past 2 months I got a really nasty posture problem, also derived from the guitar posture I play in.
It happened as you mentioned: I started to lean to much over the guitar to see what I was doing to the point that I was even aprouching the head over the fretboard (seated on standing).
What happened with this horrible posture was that, my back muscles reached their limit on holding the guitar and the tension I was putting on them, this and stress and ansiety over this last months because of other things, and my backs started to hurt all day until their seriously tnsioned after a live show I attended. The next morning they were so contracted I couldn't rotate my torso or head. I had to have several sessions with a masseuse to relax every muscle, and lengthening my spinal column, because of the contractd tensioned muscles that forced it into an unnatural position. I play guitar for over 10 years (still amateur but hopping to change to a professional level in a short time) and never had any issue of this kind with by back...go figure.
The tensioned muscles were aready affecting my column posture and the shoulder's muscles got tensioned and started to hurt also. Really nasty to the point that I'm still recovering from it, after more than 2 months. I had really nasty pain on the back and shoulders!
Now for the recovery....I'm having Pilates classes: specific exercises for the inner core muscles inside our body, resposible for the body posture; and Body Balance: Yoga, Pilates and Tai-Chi mixed together to achieve body balance (hence the name), so our body is less prune to this kind of injury.
The thing I can say to your post is, don't stop doing exercise if you want to be a musician or play regularly supporting and intrument with your body.
I think those kind of classes I mentioned are really really important for a musician that plays standing.
Specially pay regular attention to your body while practicing and correct it. Your body will learn and remember the way it's used to play your instrument. (Just like learning and remembering scales).
The good think with all this is that, I've learned allot about body posture, exercises to relax and develop core muscles strength that will help me in my future in playing guitar! if I want more than being just an amateur...imagine if this happened while I was already working as a session musician, with a band or something.....
Hope this helps.
Cheers,
Hugo