It depends a bit on the cause.
An alpha-adrenergic blocking agent used for hypertension may help relieve nightmares
, so do various drugs given for post traumatic stress
disorder. I suggest consulting a sleep
specialist first to look for underlying causes--some medical conditions also cause nightmares. Sleep docs may be pulmonologists, psychiatrists or neurologists.