i had that happen to a horse at work. I decided it was from a spider bite when the horse was eating in his stall b/c spiders like to hang out in the hay basket part of the feeder. someone else suggested that he might have gotten shavings or something in his eye and had a reaction to it. i'll will go down on its on i'm sure, if you are concerned and can open the eyelid, look in.
in a not-so-related story, an actress filming in australia or new zealand woke up one morning with her eye completely swollen shut. turns out a BIG moth had crawled under her eyelid while she slept.