I don't pet mine. There is the BCI who doesn't mind my lap. I don't have to restrain her, she just rests there, body relaxed and breathing slowly. But I think I'm more or less the next convenient basking spot.
The rest of my snakes would be all over the place. My CA king does a cloverleaf pattern with me in the center if I let him go. A few times he returned to poop on me. Not sure what that means. I normally don't let him roam, but he is so active that I just had to try a couple of times to find out what he'd do.