Well, I have woken up a number of times with rather nasty headaches in the middle of the night, including on my second titration study. But mine seem to be some variation on a migraine (yes, it's been reported) complete with aura on that titration study. So I'm not willing to blame them on the CPAP/BiPAP. And I really can't imagine how CPAP/BiPAP might be a migraine trigger for me either for what it's worth.
To the OP:
In addition to the obvious---report the problem to the doctor because it does seem unusual, check and recheck the mask and headgear to make sure they're not too tight, and make sure those exhaust vents are not blocked by the bedcovers or bed pillows---what's your previous history with headaches of various types? Any chance the tension and stress of adjusting to CPAP is triggering an older problem with headaches to manifest itself in a newer fashion?