It is way more common that you think; especially today with most of us working at a key board.
Like Frank says you need to be conscious of it. On a more preemptive basis think running with a stake through your spin. Head up, a string pulling your chest up and forward (think the old toddler pull along duck toy) and shoulders back. Hands should be loose and somewhat open with the hands floating along the belt line. On a sunny day where a cap or visor with a dark under brim color and sun glasses. Finally, smile or at least think happy thoughts.
Breath in and out in a regular and relaxed manner, 2-3 steps for each in and each out.
Longer term work on core and back exercises to strengthen the support for the upper body.
Shake the hands, shoulders and arms out occasionally, especially when you notice a hand starting to grip or a shoulder starting to roll forward.