I've just found this fascinating case study in American Journal of Physical Medicine and Rehabilitation about a man who lost conscious control over one of his hands after brain injury and suffered involuntary public masturbation episodes as a result.
Involuntary masturbation as a manifestation of stroke-related alien hand syndrome
Ong Hai BG, Odderson
Am J Phys Med Rehabil. 2000 Jul-Aug;79(4):395-8.