Why do my eyes hurt when I wake up?

Many reasons. There are many possible reasons why you might have eye pain upon waking. The most common is from a form of dry eyes called meibomitis. It is essentially an oil gland that produces poor quality oils that irritate the eyes when you are sleeping. You really need to see an eye md to determine the exact cause of your eye pain.