My son plays with his ear.
My daughter did this for a couple of weeks too at 5 months; it freaked me out, and I was scared of her getting a bald spot from friction, and it was a nightmare to brush her long hair in the mornings. If he’s doing this just use a satin or silk crib sheet and it will help so much to prevent friction balding and hair knots. I ordered mine off Temu for like 4 dollars.