Practice a lot when you are not too tired; exercising those muscles and building a habit of standing/sitting up straight will slowly increase your ability to do so more consistently.
I am much better able to maintain good posture comfortably and for longer periods of times when standing, and setting up my home computer with a standing desk has improved my posture and reduced my back pain.
I have also heard it recommended to have a mirror in a place where you will see yourself slumping; it will motivate you to sit/stand up when you see yourself. This has not been very practical for me, but may work for others.
Practice a lot when you are not too tired; exercising those muscles and building a habit of standing/sitting up straight will slowly increase your ability to do so more consistently.
I am much better able to maintain good posture comfortably and for longer periods of times when standing, and setting up my home computer with a standing desk has improved my posture and reduced my back pain.
I have also heard it recommended to have a mirror in a place where you will see yourself slumping; it will motivate you to sit/stand up when you see yourself. This has not been very practical for me, but may work for others.