It seems that you might have Restless Legs Syndrome (RLS). This is largely due to an imbalance of the neurotransmitter Dopamine. Dopamine is responsible for transmitting signals between the brain and nerves. If there is inadequate stimulation of the nerve- you will experience pain. If this is affecting your daily activities the following day, I would advise you to seek the help of a neurologist to get the correct diagnosis and treatment. You can try wearing compression stockings at night, sleeping with a pillow between your legs and performing stretching exercises before bed.