Lateral flexion is the key to vertical flexion and a soft and supple body for your horse. Doing ground flexions where you get your horse to touch its nose to its ribs on each side usin treats etc can really help. I would do it before AND after I ride and be very consistent. Also make sure the stiffness is not coming from a pain response or discomfort.
When you're riding, lots and lots of dressage work will really help. Get him softend and work on shoulder-in and shoulder-out. It really gets him moving through his back and really helps him use himself better. When you do have him softend, slowly put your hand forward, so he moves down on the bit and puts his head and neck down, this really helps stretch his back.
it's hard to explain but if you stand behind your horse, and drag your finger nails down from his croup on his thigh, most horses will raise their back and stretch out that muscle, loosening his back. doing this before and after a ride 3-10 times whatever pressure you feel will be comfortable for him, will definitely help!