Consider "twisting" or "twirling one'sI don't think you can use one word to say "play with someone's hair", but I think the verb "to caress" does a better job of expressing the idea of him lovingly stroking her hair:
My toddler hasHer head was in his lap, and he was caressing her hair.
Definition:
caress: to touch someone gently in a habit of twirling/twisting her hairway that shows you love them