The trick is to get up and walk around for a bit every hour.
I haven't used it in quite some time, but several years ago, I found
x11/rsibreak helped me to create such a habit. There are probably similar applications available for Windows and macOS if necessary.
I myself have a standing desk but even with this my posture still feels like it is getting progressively worse and there is not much I can do about it.
...
How do you deal with poor posture?
You can pretty easily find online content indicating that prolonged sitting for uninterrupted periods of time is definitely bad for your health, but you can also find similar content suggesting that standing for too long can also be unhealthy, such as spinal compression that might be contributing to your posture problem:
6. Standing all day can also be bad for your health.
Even though sitting has been compared to smoking for its effects on health, there are ill effects associated with standing for long periods of the day too. Standing all day will compress the spine, which can lead to a different set of lower back issues over time. Standing increases the risks of varicose vein development, deep vein thrombosis, and heart health concerns. In a 12-year study on heart disease reported on by U.S. News and World Report, people who primary stood on the job doubled their risk compared to people who mostly sat.
— from
19 Pros and Cons of a Standing Desk
If you are able to take some short breaks, make sure you move around a bit. You don't need to go for a jog or even "power walk", but some light stretching or a casual tour around the office to break away from your work can be enough. Remember that you're relieving a bit of minor physical tension, not training for intense physical activity like a parkour run. If you can't get away from your work for a couple of minutes, you could look into
some exercises to combat the ill effects associated with working for hours at a desk. I hear some exercise in the mornings and/or before bed can be helpful as well.
A related idea is stress relief: if you're experiencing aches and/or pains, perhaps some psychological wear and tear is affecting you physically as well. Obviously this can have an effect on your posture over time due to the burden on your body. In that case, you might look into stress relief ideas like yoga, kickboxing, meditation, cooking, dancing, shopping online, woodworking, tutoring children, volunteering at a homeless shelter, etc. Even just drinking a steaming cup of some pleasantly scented tea can be soothing. What kind of "therapy" is effective depends on what you enjoy and how much you can commit to the activity. If you're on-call for a week, for example, you will almost certainly be interrupted, which will mean any attempt at stress relief can be far less effective. Otherwise, if you're doing something like meditating, turn on the "Do Not Disturb" feature of your mobile for the length of time you're dedicating to your activity, assuming you have a mobile device with such a feature, and only allow specific people to contact you, such as family in case of an emergency.