I recently learned about the illness which is caused by a niacin deficit and afflicted many people in the south of the US during the early 20th century who subsisted on a corn heavy diet during the warmer months of the year. As far as I know the diets of the average inhabitant of the Aztec and Maya empires were very corn heavy and meat was often uncommon. So do we know if people suffered from Pellagra to any great degree?
In Mesoamerica, and elsewhere, most maize underwent a process of nixtamalization (derived from the Nahuatl term for the process, nixtamalli). This involved soaking the maize kernels in an alkaline solution, usually made from ash (nextli) or lime. The chemical reactions involved unlocks the niacin in the maize and allows the human body to absorb it, preventing pellagra from becoming an issue.