Yes, I have done this technique and found it to be effective in improving concentration and mental processing.
At the beginning, I wouldn't try to swim while you're doing it, because it will probably be too exhausting to remain underwater for very long while doing aerobic activity. It actually helps at first to keep your body very still and relaxed while holding the breath -- this makes it easier to gradually improve the amount of time you can stay underwater. This can be difficult to do in a swimming pool so you may want to start out in a bathtub.
As far as other techniques to increase the amount of time you can spend underwater, I have found that yoga and chi-gong are very helpful, anything that stretches and promotes the flow of energy in the body, and stabilizes the breath. Pranayama (alternate nostril breathing) is also very helpful in this regard.
The most effective exercise I found was to spend 5 minutes standing on my head, immediately before my underwater sessions. This increases blood flow to the brain and increases the amount of time you can spend underwater.
I achieved good results through this exercice after spending about 20 mintues underwater every day, for about two weeks. Hope this is helpful.