I started researching this question and found an interesting first hand account by an adventurous fellow who ground up tablets of nitroglycerin and applied them to his penis with an ointment.
The result was that he absorbed the drug, and had relaxed blood vessels throughout his body. This was more bothersome than erotic, and he says the experiment was a failure.
Other studies — from the pre-Viagra period – explored the use of nitroglycerin for ED. Here are some:
1. J Urol. 1989 Mar;141(3):546-8. Topical nitroglycerin: a potential treatment for impotence.Owen JA1, Saunders F, Harris C, Fenemore J, Reid K, Surridge D,Condra M, Morales A.
2. J Urol. 1991 Jul;146(1):50-3. Minoxidil versus nitroglycerin: a prospective double-blind controlled trial in transcutaneous erection facilitation for organic impotence. Cavallini G.
A new type of topically applied drug (minoxidil) to facilitate erection is presented. Minoxidil acts directly on arterial smooth muscles via relaxation. This drug (1 ml. of a 2% solution) was studied under strict laboratory conditions in a double-blind controlled trial on 33 patients (4 with neurogenic plus arterial, 10 with neurogenic and 19 with arterial impotence) and compared to placebo and nitroglycerin (2.5 gm. of a 10% ointment). The application sites were the penile shaft (nitroglycerin) or glans penis (minoxidil and placebo). Increases in diameter and rigidity were measured with the RigiScan device and arterial flow was evaluated by conventional Doppler sonography. Side effects were considered as well. This drug proved to be more active than nitroglycerin and placebo in increasing diameter, rigidity and arterial flow of the penis. The highest activity proved to occur in neurogenically impotent patients. Fewer side effects also were found with minoxidil than with nitroglycerin. For these reasons minoxidil is proposed as a long-term therapeutic agent for organic impotence.