I had the same problem as you, except it was through intercourse. When my boyfriend would finger me, I would get some really intense orgasms and I would stop breathing for a short time like a few seconds. When I noticed that what I was doing, I told my boyfriend about it. He now pays very close attention to me when he fingers me, and is always reminding me to breath when I stop making noise. Who would ever think you would need someone to tell you to breath?! lol I guess me. Good Luck
People sometimes forgot to breathe when they are having sex and that can cause the headaches. My suggestion is try to remember this next time you have intercourse and if it doesn't help.... then talk to your physician.