That's not good.i stopped kicking - and laid on my stomach on the seabed for a few mins - it still didn’t help so I shot up to the surface. It was the scariest thing ever!!![]()
Assuming your air was on, the most likely explanation was general discomfort and a reg that was not as good as you are used to leading to incomplete breathing cycles and thus CO2 buildup. Some people respond that way to nitrogen narcosis, but that's extremely unlikely at 38' (12m).
Excessive CO2 does nasty things to the brain and body. Thankfully it's super easy to deal with, just make longer exhales. You say you normally do 3 seconds in and 3 out. Try 3 in and 5 or 6 out. You'll need to slow the volume per second, but that's OK. You want the exhaled bubbles to be a steady stream, not one big glob.
Really concentrate on the exhalations, the inhalations will take care of themselves.