During the years of 1971 through 1982 when I averaged about two marathons annually, I would sometimes notice a pungent odor which seemed to be very much like ammonia. This would usually occur during the late stages of a 20 mile training run. My personal experience was that it seemed to happen mostly during the winter, when I would wear one layer of clothing more than I should have. Ah, the joys of running. It turns out that there is a logical reason for the ammonia-like odor during or after extensive physical exertion.
Ammonia is a by-product of protein metabolism.
This can be a problem for runners who don't take in enough carbohydrates for fuel. When the body runs out of carbos, it begins to search for alternative fuels, like fats and protein. One source of protein is from muscle tissue. The ammonia I smelled was my own muscle tissue being broken down for fuel. Not a good situation.