I’ve recently realized the very real and very understandable boundary that my cat had where he does not wish to be petted (and stimulated, and surprised) while sleeping, even if purring on my lap.
When I started respecting this boundary he started telling me when he wants pet time (by screaming at my face and occasionally, doing a social roll on my lap, which is insanely cute.)
This is my attitude with strange small children who seem drawn to me. “Aren’t you sweet? You shouldn’t hug strangers. For several reasons.”