Get your footwear dialed in! Use after market orthotics if they help. You can't go anywhere without good tires.
Reread Lyle and Many Walks posts.
You don't say what you feel is at issue with your legs. If joints are a problem there are some supplements that help a lot of hikers. Glucoasime, chondroitin, MSM, and Hyaluronic Acid are some of the major ones you may possibly want to explore, even before you start hiking Some others that support joints or are anti-inflammatories: Boswellia serrata, Turmeric, Arnica, White Willow, Cayenne, Hydrolyzed Collagen, SaMe, Pycogenol and foods or supplments that are high in Omega fatty acids.