Why does my cat lick me and then bite?

So, I adopted a 9-month-old cat from owners who had allergies. He adjusted well, but at night, he startled me by charging at me, licking and biting my arm while purring loudly and aggressively. It was quite intense and painful, so I had to push him away. But he kept coming back and wouldn’t stop. I was confused and frustrated, so I had to play with him until he finally calmed down. This happened three times at night.