It could be mild allergic reaction to something. Swollen eyelids are usually first symptom of allergy.
Have you been allergic to something or this is the first time you have experienced something like this?
There isn’t much you can do except you can reduce the swelling and hope that it was one time only. You can use warm or cold compress. Try both and you will feel what better suits you and if you see that cold compress is better than this is definitely allergic reaction.
Also you can use tea bags, for this type of swelling chamomile tea is the best because it isn’t strong and it can’t cause even further damage. I hope this was helpful and that you will not experience this again anytime soon.