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.

 Abstract
The effect of 2 per cent nitroglycerin paste applied to the penile shaft of impotent subjects was evaluated in a placebo controlled double-blind study under laboratory conditions. After application of nitroglycerin paste or a placebo ointment base, penile tumescence was recorded through a strain gauge transducer while subjects viewed an erotic video presentation. Relative to the placebo paste the number of subjects demonstrating an increase in penile circumference after nitroglycerin (18 of 26) was significantly different than all other outcome possibilities (p less than 0.05). Noninvasive vascular assessment by ultrasonography demonstrated an increase in diameter and blood flow in the cavernous arteries after application of nitroglycerin paste. Nitroglycerin paste increases blood flow in the cavernous arteries and improves tumescence after erotic stimulation. This agent may represent a new therapy for impotence.

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.

Abstract

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.