Police Scotland were called in after the body was found in the Harribrae Park area of the town at 8 pm on Monday.
The deceased has been formally identified as Michael McCreadie, 50, who had been reported missing.
His family has been made aware and police have said his death is not being treated as suspicious.
Edinburgh crime: Man critical after suffering serious head injury in city centre ‘fight’
Edinburgh weather: Capital and the Lothians warned as Met Office predict thunderstorms to follow heat wave
West Lothian fire: Pictures show firefighters still battling West Lothian wildfire which broke out three days ago
Lothian bus driver ‘hit by stone’ as police launch witness appeal
Sharleen Spiteri: Texas singer rescues young bird while playing East Lothian music festival
A report will be submitted to the Procurator Fiscal.