Assuming you're not suffering aching legs from overexertion, you may have restless legs syndrome (RLS).
People with this have various sensations to describe, from an itching deep inside the bones, an irresistible urge to move the legs to an ache as you describe but it does have a number of causes.
Nutritional deficiencies of B vitamins, Folic acid, Iron or Magnesium are associated with RLS, as are habits such as drinking, smoking and drinking tea or coffee.
Inactivity or very hard exercise can worsen symptoms, although mild exercise involving the legs (walking, cycling in easy gears and stair climbing) can help.
RLS is quite common and you have reminded me I should write a blog on this subject but in the meantime please follow this link to a very useful external website: http://www.helpguide.org/life/restless_leg_syndrome_rls.htm
I hope this helps you recognise your own RLS cause and so find the best remedy.