Why do I feel like something is poking my eye when I'm trying to sleep?

Dryness and erosions. Tear production is lower when we rest and sleep. Eye movement stops before we start dreaming and enter rem (rapid eye movement) sleep. If there is no lubrication between the lid and the eye, then you start to "sandpaper" your corneas when rem sleep begins. This can lead to painful corneal erosions that hurt and can actually wake you up. A lubricant gel before going to bed cn break this cycle.
Trichiasis. Could be an eyelash....Look in the mirror with one eye open...See if an eyelash is poking you...If so see your ophthalmologist for care.