One or more implantable microminiature electronic devices, termed “microstimulators”, are used to treat sleep apnea. The microstimulators are implanted at strategic locations within the patient and are then controlled in a manner so as to stimulate muscle and nerve tissue in a constructive manner which helps open blocked airways. In one embodiment, the microstimulators sense blockage of a patient's airway and provide electrical stimuli in a closed loop fashion to open the airway. In another embodiment, at least one microstimulator treats sleep apnea in an open loop fashion by providing electrical stimulation pulses in a rhythm or cycle having a period corresponding approximately to the natural respiratory rhythm of the patient. Such open loop stimulation entrains the patient's respiratory rate to follow the pattern set by the microstimulator so that stimulation is applied to open the airway during a period of inspiration by the patient. The microstimulator devices receive power and programming (control) signals by inductive or RF coupling from an external transmitter, either during actual use by the sleeping patient or during recharging periods in the awake patient.