A device for delivering electrical stimulation to muscles of a foot (31) of a patient, the device comprising one or more power sources; a signal generator (410) for generating electrical current, the signal generator remotely programmable by a physician monitoring the patient, wherein the electrical current is for causing the muscles to contract or for disturbing pain signals communicated by the muscles to brain; at least two electrodes (430, 435) in communication with the signal generator (410) for delivery of the electrical current to the foot, wherein the at least two electrodes are adapted to be located at two or more of medial ankle at location of posterior tibial nerve, lateral ankle at location of sural nerve, and anterior ankle at a location of anterior tibial nerve; and an accelerometer in communication with the signal generator, wherein the signal generator ceases to generate the electrical current if the accelerometer communicates movement of the patient and restarts to generate electrical current after a pre-programmed period of inactivity by the patient is communicated by the accelerometer.