You may be having plantar fascitis or calcaneal spur,but its difficult to say without examining whats the reason for this problem.
Next Steps
You should consult an orthopedician.In the meanwhile you can do one simple exercise that is ,lie down straight on bed with your legs elevated (supported by pillows ) at an angle of 45 degree and move your ankle up,down,circular motion clockwise anticlockwise for 10-15 min before going to sleep,it will flush away all the toxins form the legs and relieve the pain.