The most frequent causes are: The age distribution ranges widely, from the teens through the sixties.
In 2016, a systematic medical review found that the risk of sudden cardiac death during or immediately after a marathon was between 0.6 and 1.9 deaths per 100,000 participants, varying across the specific studies and the methods used, and not controlling for age or gender.
This translates to a few published marathon deaths worldwide in a typical year, although the authors lamented the lack of a central registry for the information.
[1] The second major risk arises from imbalanced fluid or electrolyte levels, particularly hyponatremia (sodium deficiency, overhydration, or water intoxication).
"[2] Heat stroke is an emergency condition in which thermoregulation fails and the body temperature rises above 104 °F (40 °C).