Magnesium works wonders. Personally, I like a hot bath with epsom salt twice per week, and one of the days is always a leg day. Extremely relaxing.
With that said, make sure you are actually hydrated. Drink as much water as you think you should each day and then a little more, especially if you take a bath, they make you sweat too.
Stretch after you workout. And after a hot bath. You are warmed up, loose, can reach a little further and loosen up tight muscles.
Try a mineral supplement, not just magnesium, for a full spectrum of electrolytes and other minerals.
I'm not a product rep, I don't know if Millennium Sport Technologies has a presence here but I've always liked their ZMK product as part of a recovery supplement regimen. (ZMK, not ZMA)
They have another one called Athlytes as well, a specific electrolyte formulation you may want to look in to. I'm sure companies that advertise here have a similar product too.
A benefit supplements like these is that you get proper ratios. No blocked or otherwise compromised absorption issues which could also be a potential problem for you in your diet/supplement regimen.