These medicines are called PDE5 inhibitors. Often, these are prescribed for chest pain called angina. You can take this medicine with or without food 30 minutes before sex, depending on the dose. When oral medications might not be safe Check with your health care team before you take any medicine for erectile dysfunction. You may get multiple erections during this time, but an erection should never last longer than four hours. It works for up to 36 hours. Viagra Side Effects Common side effects of Viagra include headache, flushing, indigestion, dizziness, and nausea.Viagra contains sildenafil citrate, an inhibitor of phosphodiesterase type 5 (PDE5). Viagra enhances the action of cyclic GMP, which is released in the penis in response to sexual . Summary. Viagra is a useful form of treatment for erectile dysfunction. It is best to take the drug around 60 minutes before sexual activity, and its effects can last up to 4 hours. . How it works Sildenafil may be used to treat erectile dysfunction (ED or impotence) in men (Viagra brand) or pulmonary arterial hypertension in both men and women (Revatio .