I have been a sloucher since I was a little kid. My mom had me tested for scoliosis when I was six! The nurse told her that I just needed to stand up straight, which, as any sloucher will tell you, is pretty useless advice. If it was really that easy, nobody would slouch.
I have improved my posture a great deal through yoga.
Yoga teaches you what good posture is. When I was exhorted to “stand up straight”, I just tried to straighten my spine, but that’s not really sufficient. In yoga, the emphasis is on having a long spine, which is a much more useful instruction than “straighten up” to me. More importantly, you learn how to “stack” your ankles, knees, pelvis, ribcage, shoulders, and head so that everything is straight and in balance. It’s hard or even impossible to maintain a straight back if the rest of your body isn’t cooperating–your back gets sore and you feel crappy and you just end up going back to your slouch!
Yoga also teaches body awareness: How do I feel when I’m standing straight? How does it feel to be properly balanced? What does it feel like when I’m not balanced? How do I feel when I am slouching? You learn what things should feel like, and this makes it much easier to notice and correct when things go wrong. In addition to learning how to consciously assess and correct your posture, you also just end up paying more attention to your body in general, so you notice when you slouch (because it doesn’t feel right!) and you want to correct it right away.
Yoga also builds core body strength, including the muscles necessary to maintain good posture.
One less obvious thing is breathing. In yoga, you learn the different types of breathing and the benefits to be gained from deep, regular breath. It’s easier to breathe when your posture is good! A lot of the gains I made in my posture, surprisingly, came from thinking about how my rib cage is situated. Are my sholders rolled forward, compressing my rib cage, or is my rib cage open and elevated? Is my neck tilted forward, compressing my airway, or is my head up and my throat open? This isn’t something I was taught explicitly, but it followed naturally from the idea of having a long spine and being conscious of my breathing.
So yoga’s great. A huge focus in yoga is spinal stretches that are great for alleiviating back pain–the bane of us slouchers. And you finally learn how to stand up straight.