When a man experiences sexual excitement, the peripheral nerves, terminal tract of the spinal cord and certain endogenous chemical substances are activated. This results in relaxation of smooth muscles in the penis tissue with wider opening of the arteries to allow more blood flow to the organ, producing an erection, which normally ends after ejaculation, when blood flows out of the penile tissues. A malfunction in any component involved in this process can result in the inability to obtain a normal erection. Some common medical conditions are linked to erectile dysfunction, such as heart diseases, diabetes mellitus, hypertension, high cholesterol, high blood pressure, obesity and sleep disorders. In addition, the cause can be psychological.