I seemed to have this problem when I sleep. I feel like I think and stare while sleeping. Wake up with tired and sometimes painful eyes. How to stop?

Eye lubrication. To verify if you are truly sleeping with your eyes open, ask someone to look at you while you're sleeping. Most people that sleep with their eyes open don't know that they do. That being said, you can use artificial tear oinment at night and aritficial tears during the day. Also, there are eyemasks that closes your eyes mechanically and gives you warm compresses while sleeping.
Relax. Try not to think to much before you go to sleep and just relax. Some people do sleep with their eyes open and it can cause them to dry out and will irritate you in the morning. You can try to put ophthalmic ointment in your eyes prior to going to bed which will help to prevent them from drying out. Other times you may actually need to tape your lids shut before going to bed.