some whales mate on their sides at the surface and roll over periodically; as far as breathing goes, even if they werent at the surface, they can hold their breaths for pretty long periods of time. certain whales have also been known to mate in groups, but im not personally sure how this works..
anyway, most whale sex is underwater actually and pretty quick, and no they dont get stuck.
if you are really looking for details, here is a good quick site:
http://whale.wheelock.edu/archives/ask00/0221.html