A 34-year-old man died in a park after a member of the public spotted him going into cardiac arrest, an inquest has heard.