The 74 year old had the surgery Tuesday and is to have tests to see when he can be released from the Albert Einstein Hospital in Sao Paulo, the same facility that treated him for two weeks last year for a urinary infection.
It said he was resting in his room after a "transurethral resection of the prostate," or TURP.
The Urology Care Foundation says the surgery "has excellent outcomes and is the gold standard" in caring for benign prostatic hyperplasia, or non-cancerous enlargement of the prostate, a common condition in aging men.
Brazilian media reports said the surgery was aimed at preventing a repeat of the urinary infection that put him in hospital last year.
That health scare, which included five days in intensive care, came after he underwent surgery for kidney stones on November 13.
After developing an infection, he was readmitted to hospital.
His only kidney - the other was removed following a rib injury during his playing days -- had stopped working and he had to be treated with hemodialysis, a procedure that involves filtering a patient's blood through an artificial kidney.
After a hospital stay that worried fans worldwide, he was released on December 9, walking gingerly but joking with reporters: "I am preparing for the Olympics!"
Pele, whose real name is Edson Arantes do Nascimento, is widely regarded as the greatest player of all time.
The only player to win three World Cup titles, he was named the athlete of the century by the International Olympic Committee in 1999.

Nicknamed O Rei (The King), Pele was born in a humble home in the city of Tres Coracoes and exploded into Brazilian football as a young phenom.
He made his professional debut for the Brazilian side Santos at 15 and won his first World Cup aged just 17, scoring twice in the 1958 final win over hosts Sweden.
He would go on to score a total of 77 goals in 91 games for his football-mad country across a remarkable career that included two more World Cup titles, in 1962 and 1970.
In 1977, he inspired the New York Cosmos to the US national title in his final season with the club, which also featured fellow greats Franz Beckenbauer, Italian striker Giorgio Chinaglia and former Brazil captain Carlos Alberto.
He scored a total 1,281 goals in his sparkling career.

Latest News from India News Desk