A method for regulating a prosthesis, such as a knee, ankle or knee and ankle prosthesis, comprising at least one joint, controlled by an actuator, governed by a microcontroller on the basis of data provided by at least one gyroscope and an accelerometer that measure an angular speed and an acceleration, respectively, of at least part of the prosthesis, characterized in that, during a defined period of time, the microcontroller monitors the measurement given by the gyroscope such that said microcontroller enters an idle state, in which said microcontroller reduces or cuts off the electricity supply for all electronic members of the prosthesis, except for the electricity supply for the accelerometer, wherein said microcontroller enters said idle state when said microcontroller detects that an absolute value of the measurement given by the gyroscope is below a given threshold during the defined period of time.