I used to rub my eyes a lot as a toddler and my nephew who's 3 years old rubs his eyes a lot especially if he's getting tired or when he's waking up in the morning or from a nap.
When we rub our eyes we stimulate the lacrimal glands, which then creates lubrication and gives our eyes some relief.
I still sometimes rub my eyes when I'm tired but don't do so as often as I used too.