This last year, my legs started getting painful after a couple of hours - which had never happened before. Tired, yes; painful, no. (Except when going anaerobic during a sprint). Same bike, no changes for three years.
Then I changed my on bike fueling strategy. I started eating more carbs, more frequently and “Hey there Sargent!” No more leg pain. No planning or planing involved, just carbs. YMMV
__________________
“A watt saved is a watt earned” 🚴🏻♂️

Not a CAT