We've been asked a few times now about using a CPAP in one of our T@B teardrop trailers they are looking at renting. Can it be done while boondocking or just using a generator if there is no shore power available?
Sure, no problem! The best solution is using the 12v "cigarette lighter" plug that most machines come with. People have had no problems using the 12V outlet to power the machine. If your unit has a heated humidifier, you may want to detach or turn it off it since it draws a lot of power and will run your battery down quicker.
Avoid using a power inverter as those introduce inefficiencies and run the battery down faster over time. And of course, powering a CPAP machine and a refrigerator, etc. at the same time is asking a lot from a battery, and won't last long.
If you have a little generator you may want to use it in the morning to recharge the T@B battery.