Some athletes and trainers say compression hose can minimize sore leg muscles. Haven't tried 'em myself, but might give it a shot.
For relief, I use ordinary topical analgesics containing salicylates and menthol. Sometimes before a ride if my neck and shoulders or leg muscles are already aching.
But use these with caution. Some folks may experience skin rashes and burning, especially in conjunction with exercise or exertion, and may be able to use topical ointments only afterward when the body has cooled down. The only time I've experienced skin irritation was from the topical ointments containing capsaicin (basically the stuff that makes hot peppers hot). The stuff didn't work any better for my aches, so I threw it away.
If you haven't used these before, apply a small amount to a small area and wait a few hours to evaluate results.
Also in very rare cases some folks may experience allergic reactions and anaphylactic shock from salicylates. Doesn't happen very often but the results can be catastrophic. The last local case I can recall was a young woman who died after applying a common topical analgesic during her high school athletic event or training. Reye's Syndrome is another rare but potentially serious risk. As a nurse years ago one of my patients in a rehab facility was an adult male who became partially paralyzed after using salicylates, although I don't remember whether it was from taking aspirin, Pepto Bismal or a topical analgesic. The warnings about salicylates most often mention young kids, but adults may be affected too. However it is very rare.