Masks with magnetic components are contraindicated for use by patients where they, or anyone in close physical contact while using the mask, have the following:
Keep the mask magnets at a safe distance of at least 6 inches (150 mm) away from implants or medical devices that may be adversely affected by magnetic interference. This warning applies to you or anyone in close physical contact with your mask. The magnets are in the frame and lower headgear clips, with a magnetic field strength of up to 400mT. When worn, they connect to secure the mask but may inadvertently detach while asleep.
Implants/medical devices, including those listed within contraindications, may be adversely affected if they change function under external magnetic fields or contain ferromagnetic materials that attract/repel to magnetic fields (some metallic implants, e.g., contact lenses with metal, dental implants, metallic cranial plates, screws, burr hole covers, and bone substitute devices). Consult your physician and manufacturer of your implant / other medical device for information on the potential adverse effects of magnetic fields.
Note, not all models or variants of medical devices listed in the contraindications are affected by external magnetic fields. If you are not sure whether an implant or medical device falls under the contraindications, or you require additional information on the potential adverse effects of magnetic fields for your particular implant or medical device, please contact your physician/doctor.
Source: https://www.resmed.com/en-us/cpap-mask-magnet-clip-guidelines/