Rest, put your feet up higher than your body, wiggle toes, stretch feet back and forth, have a glass of wine, get up, walk around, repeat, rest and then have another glass of wine. I still get aching legs, I don't know if my ache problem is the same as yours, but mine always happen during the night. After a hard days hiking my legs, or just one of them, will often 'lock' into muscle cramps. When it happens I know that I have to get out of my tent pronto, it's just too painful to just lie there! I clumsily crawl out of my tent on my hands and knees and obviously, the grass is usually wet and cold, not to my liking at all if its 3 o'clock in the morning! My third problem, once outside, is then to stand up, not easy to do sometimes, I often feel like a rusty hinge! My legs ache mostly when I'm hiking long downhill stretches and I also get what I call 'the trembles' my front upper leg thigh muscles often keep trembling involuntarily but the sensation, once I stop, wears off fairly quickly.