Obstructive Sleep Apnea (OSA) is a potentially common sleep disorder in which the upper airways are collapsed either partially or completely. The golden standard method for treating OSA, is the full night Continuous Positive Airway Pressure (CPAP). Yet, due to the ensuing discomfort, it incurs on patients, researchers have been motivated to investigate other alternatives, whereby, OSA can be effectively treated. Recently, an increasingly popular OSA treatment has been developed that consists in activating the protrusion muscles of the tongue by stimulating the Hypoglossal Nerve (HGN). In this context, the present work is conducted to propose the design of apnea detector module as part of an implantable HGN stimulator based on the esophageal Pressure Pes signal as a new approach for controlling OSA occurrence. Specifically, an effective real-time apnea event detecting algorithm is put forward. Following the achievement of satisfactory simulation results, attained through the Modelsim simulation tool, we proceeded with assessing the possibility of its hardware implementation on a Field-Programmable Gate Array (FPGA) device. To this end, the apnea detector module was synthesized and designed. The low power consumption and the small size, characterizing this module, which have made it possible to integrate it as part of a wirelessly-powered implantable HGN stimulator.