The breathing rate is utilized as a reliable indicator in many cases to predict and diagnose respiratory diseases as well as the respiratory dysfunction caused by diseases such as the cystic fibrosis. Therefore, in this study, a self-powered implantable respiration sensor based on a contact-separation mode triboelectric nanogenerator (TENG) was designed to monitor the respiratory rates by sensing the variation of the diaphragm muscle. For this purpose, a polytetrafluoroethylene film with a thickness of 160 μm and a nylon film with a thickness of 180 μm are employed as the negative and positive triboelectric materials. Two copper layer each with a thickness of 100 μm are placed on the outer surfaces of the triboelectric layers as the conducting electrodes. In order to uniformly deform the moving plate of the TENG, it is rigidly attached to the center of the diaphragm through a silicon mechanical coupling element with dimensions of 80 x 80 μm2. The pressure caused by breathing on the diaphragm muscle, which is in the range of 266-666 Pa, is applied to the center of the device diaphragm. The effect of various parameters including external pressure, frequency and surface charge density on the output performance of the device is also investigated. It is evident that higher external pressure results in intensive deformations of the moving plate of the TENG, leading to a more significant energy conversion efficiency of the device. Similarly, increasing the surface charge density causes an increase in all electrical output parameters. Moreover, the device achieves an output power of 0.209 nW at a load resistance of 20 GΩ by applying a pressure of 666 Pa at a frequency of 0.24 Hz. All the results demonstrate the potential of the new proposed sensor for detecting and monitoring real-time respiratory rates with high sensitivity and clinical applications.