Arguably, this story does not contain elements of magical realism. It is important to be clear that magical realism is a literary style that was first created by Latin American authors in the twentieth century. Its characteristics are the way that the supernatural and the magical commingle so as to present the supernatural events as if they were part of everyday reality. Therefore, such texts contain events such as an elderly angel with enormous wings being found on a beach, characters who have accurate premonitions, women who are so beautiful that they drive everybody to distraction before they fly up into the heavens. These events are never explained in a rational sense: the reader, rather, is left with them presented as reality. Such authors do this in order to question the bounds of reality and also as a form of literary protest.
Turning our attention to "The Legend of Sleepy Hollow," it is clear that this cannot be seen as an example of magical realism. This is because the appearance of the headless horseman is clearly, if not directly, explained as being Brom Bones playing a joke on his suitor, and the head that was thrown at Ichabod being a rather large pumpkin:
In one part of the road leading to the church was found the saddle trampled in the dirt; the tracks of horses' hoofs deeply dented in the road, and evidently at furious speed, were traced to the bridge, beyond which, on the bank of a broad part of the brook, where the water ran deep and black, was found the hat of the unfortunate Ichabod, and close beside it a shattered pumpkin.
There is no sense in which the apparition is left unexplained, and Ichabod's credulity is linked to his major failing, which is shown to be too much imagination. Just as he shows himself to be overactive in imagining what life would be like married to Katrina van Tassel, so too does he have too vivid an imagination when he is pursued by Brom, that prevents him from seeing reality. At the end of this story, the lines between what is real and what is not real are clearly drawn, which indicates it is not an example of magic realism.