A functional electrical stimulation method and device that starts electrical stimulation of a first leg of a person when a distance between a reference point on the person's first leg and the surface on which the person walks exceeds a first predetermined value and stops electrical stimulation of the first leg of the person when the distance between the reference point and the surface falls below a second predetermined value, wherein the first and second predetermined values are calculated from an initial measurement of the distance between the reference point and the surface when the person is standing still and the first leg is perpendicular to the surface. The first predetermined value is greater than the second predetermined value. The method and device produce a more natural gait in persons with drop foot, and minimize the time electrical stimulation is applied to muscles so as to minimize muscle fatigue.