During the overnight procedure, which took around an hour and required general anaesthetic, Defence Minister Moshe Yaalon temporarily assumed the 63-year-old premier's powers, Netanyahu's office said in a statement.
Yaalon was also slated to head a cabinet-level meeting on Sunday to select Palestinian security prisoners for release as part of US-sponsored peace negotiations, the second round of which was scheduled to take place on Wednesday in Jerusalem.
Yuval Weiss, director of the Jerusalem hospital where the surgery took place, said the operation was ordered at short notice as a precaution against Netanyahu's condition deteriorating. Netanyahu's office said he had been diagnosed after complaining of abdominal pain.
"The prime minister feels well after the operation," Weiss told Israel Radio. "He is now fully conscious."
A statement from Netanyahu's office said he had reassumed his powers of office, and a short time later he was released from the hospital, where a statement quoted him as saying, "I'm feeling fine."
Weiss said Netanyahu would require several days of home rest.
"He will be able to hold meetings and discussions at home. He has to be a little limited in terms of physical activity," the doctor said.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.