The pill, commonly known as Viagra, is a regulated treatment primarily used to manage impotence in men . Developed initially for cardiovascular problems , its surprising side effects relating to the widening of blood vessels led to its repurposing as an effective solution for sexual dysfunction .