Using a CPAP device could potentially affect the accuracy of the app. We would suggest setting the microphone sensitivity in Pillow settings to "Low" and placing you iPhone device about 30 cm from your body for better results in this case.
If you are also using Pillow with an Apple Watch, we do not expect a CPAP machine to significantly affect Pillow's accuracy, although it may still be picked up by the Sound Recordings feature. In that case you may lower Pillow's microphone sensitivity.
You can reduce the microphone's sensitivity as follows:
Open Pillow on your iPhone
Tap on the Settings icon on the top right corner
Go to "Microphone Sensivity"
Select "Low"