Yes, rubbing your eyes may cause the swelling. Generally speaking, the swollen eyes have numerous causes, such as inappropriate use of cosmetics, skin disease, heart renal insufficiency, angioneurotic oedema. It is generally divided into physiological edema and pathological edema. However, when you rub the eyes, the invisible bacterium may come into the eyes. And your eyes may get high possibility to get the eyes infection. That is why you get the eye swelling. You'd better not rub your eyes any more. And you could use some eye drops to release the symptom of eyes which will clear the inflammation. In addition, you should keep notice of the diet and not eat the spicy food during this time. And you'd better not drink too much water before the sleep which may cause the swelling eyes to get serious. If they are not released after a period, you may go to the hospital to have a check.