Explaining bad grades in application: SOP or separate letter
Some web-based application forms have dedicated fields for comments on grades or academic hardships. I would first of all take advantage of these if possible, and second, read the fine print if not: some application guidelines will forbid submission of additional materials. This doesn't have to stop you, but I would contact the admissions staff either way if there isn't a dedicated field. It should be as simple as asking, "May I enclose a brief additional letter explaining an issue in my academic history?"

In my opinion, that's what you should do however you can, unless admissions expressly forbids it, or if the issue at hand somehow affected your academic purpose. The statement of purpose is a fairly important and somewhat haphazardly scrutinized document, so anything tangential that interrupts your flow or the optimism and enthusiasm you express for your present and future work is likely to detract from the cohesiveness your message, the consistency and positivity of your tone, and the room you have to go into detail and cover other important information. You never really know what your readers are going to pay attention to in your writing, so it's best not to take any chances and leave it as flawless as can be, while conveying important but unexpected information through other channels if possible.