Is your erectile dysfunction due to psychological (stress, relationship problems, etc.) or physical factors? Your doctor may ask if you note erections at night or in the early morning. Men have involuntary erections in the early morning and during REM sleep (a stage in the sleep cycle with rapid eye movements). Men with psychogenic erectile dysfunction (erectile dysfunction due to psychological factors such as stress and anxiety rather than physical factors) usually maintain these involuntary erections. Men with physical causes of erectile dysfunction (for example, atherosclerosis, smoking, and diabetes) usually do not have these involuntary erections. Men with psychogenic erectile dysfunction may relate the onset of problems to a "stressor," such as failed relationship. Your doctor may suggest a test to determine if you have erections during sleep, which may suggest that there may be a psychological cause of the erectile dysfunction.
Besides treating the underlying causes such as potassium deficiency or arsenic contamination of drinking water, the first line treatment of erectile dysfunction consists of a trial of PDE5 inhibitor (such as sildenafil). In some cases, treatment can involve prostaglandin tablets in the urethra, injections into the penis, a penile prosthesis, a penis pump or vascular reconstructive surgery.
Nearly every primary care physician, internist and geriatrician now understand that many older men retain an interest in sexual activity as they age. Some primary care physicians think that sexual potency in older men is the norm, and that if it is lacking, it is ‘all in the head.’ This viewpoint has not been supported by current literature. The Massachusetts Male Aging Study (MMAS) found that 52% of men between 40 and 70 years old reported having some form of erectile dysfunction (ED).1 The reality is that ED is a natural part of ageing and that the prevalence increases with age. In the MMAS, they found that roughly 50% of men at 50 years old, 60% of men at 60 years old and 70% of men at 70 years old had ED. Thus, nearly all men who live long enough should develop ED. The myths that surround the problems of impotence or ED confound the attempts of patients to receive treatment and the attempts of physicians to help them.1
There have been some studies to suggest that a placebo effect that improves ED may work for some men. One study found that men taking an oral placebo pill showed as much improvement in ED symptoms as men who took actual medication to improve ED. Conversely, men who were given therapeutic suggestions to improve ED did not see signs of symptom improvement.
Taking one of these tablets will not automatically produce an erection. Sexual stimulation is needed first to cause the release of nitric oxide from your penile nerves. These medications amplify that signal, allowing some men to function normally. Oral erectile dysfunction medications are not aphrodisiacs, will not cause excitement and are not needed in men who get normal erections.
The association between low testosterone and ED is not entirely clear. Although these 2 processes certainly overlap in some instances, they are distinct entities. Some 2-21% of men have both hypogonadism and ED; however, it is unclear to what degree treating the former will improve erectile function.  About 35-40% of men with low testosterone see an improvement in their erections with testosterone replacement; however, almost 65% of these men see no improvement. 
Can apple cider vinegar treat erectile dysfunction? Apple cider vinegar is thought to have many health benefits, but can it help treat erectile dysfunction (ED)? ED can result from cardiovascular problems, diabetes, and other factors. Apple cider vinegar may help improve symptoms of conditions related to ED. Find out how it may help, and how to use it safely. A Home-Based Walking Program Improves Erectile Dysfunction in Men With an Acute Myocardial Infarction. The American Journal of Cardiology, 115(5), 5741-575. Retrieved from http://www.ajconline.org/article/S0002-9149(14)02270-X/abstract