Your eyes may get the infection because of the invisible bacterium. You need to use some eye drops to moisture the eyes. The eye drops with anti-inflammation could get rid of the invisible bacterium. You could also use some warm compress by finding the clean cloth and hot water. If these do not work, you could go to see the doctor to have a check.
I'm sorry to hear about that. But you don't need too nervous about it. May be just your sleeping posture not very well caused it, or may be you you don't have a good sitting and standing posture when you are working and reading. You know, nowadays so many people don't care about their posture when reading books and watching TV. It's always cause imbalance with eyes and make your right eye or left eye bear too much pressure. So, don't worry it. Maintain good posture when you need a long time to use your eyes.
Well, for your situation, I have to say that you may suffer from eye infection. And that is why the side of your eyes hurts. Generally speaking, the most common reason of hurt in the eyes can be eye infection. And when eye infection occurs, it will just accompany with some other symptoms, such as hurt in the eyes, or red eyes, itchy eyes. For your situation, I will suggest you have some cool teabags under your eyes first, and just repeat it for several times. And then it may be fine. If you still feel hurt, you may need to go and see the eye doctor as soon as possible.