This could be the result of a temporary interruption in the blood flow to the leg, such as happens when one sits in an awkward position for too long and the leg "falls asleep". The feeling is restored once the circulation is restored.
Another condition known as "spinal stenosis" can cause intermittent numbness and heaviness in a leg. This is when something like a slipped disc or extensive arthritis in the spine presses on the spinal cord. The onset of symptoms can occur in certain positions or as a result of certain activities, and then improve once the pressure on the cord is reduced.
While these conditions are common and often stable, they might also indicate a worsening or progressive condition requiring medical intervention to fix or manage. Please see your GP or a neurologist to have this evaluated.
Hope all works out for the best. Please let me know if you have any further questions.