It was closed to journalists, but images and video were distributed by the Israeli government showing the two men walking together into the water barefoot at Olga beach.
The two sipped water produced by the machine, served in wine glasses, before Modi hitched up his pants and waded ankle-deep into the surf. Netanyahu did not roll up his slacks, which got soaked.
The two leaders' exuberance for warming bilateral ties has taken the form of bear hugs, greetings on social media and pledges for increased trade and cooperation.
Modi's visit, the first by an Indian prime minister, marks 25 years of diplomatic relations. He visited the Yad Vashem Holocaust memorial, embraced a boy whose parents were killed in a 2008 massacre in Mumbai carried out by Islamic militants, and addressed an ecstatic crowd of Indian Jews in Tel Aviv.
Modi did not meet with any Palestinian officials during his visit. Indian and Palestinian officials say there was no snub, noting that Palestinian President Mahmoud Abbas visited Modi in India in May.
(With inputs from AP and AFP)