I think in the SWB megathread there are people that discuss how to do this.
What's worked for me is to be in a sitting position, hyperventilate for several minutes, then quickly stand up and hold your breath. Also put your thumb in your mouth and "blow" against it creating pressure. I recorded myself doing this and after a few seconds of holding pressure I passed out and then fell to my side. I had no recollection afterwards.
The only issue with this is that you would most likely wake up a few seconds after, and then just drown or pull yourself out of the water. To keep yourself knocked out you have to keep blood from getting to your brain continuously, aka asphyxiating yourself. Obviously not fun.
I'm not an expert on the method, maybe there's a better way to do it.