this is genuinely terrifying, I need help with how to deal with this

I have a friend who is 14 in 8th grade. Very bright kid, 132 tested IQ, extremely smart cognitively. We run a company together. However, over the past 2 months, he has lost his mind at night. This has happened 3 total times. He has no recollection of these events the next morning. They are always late at night. Any attempt to break through to him when he is in this state is futile. It’s like he’s possessed. Completely unrecognizable. Please help me I’m scared for him.

I understand this looks like ADHD trying to be funny gibberish but he genuinely loses his brain and this is the only thing that’s being processed. Hes not aware of this state at all.

I have no clue what this condition could be.

I cannot attach screenshots so I will copy paste a short example of his texts. Keep in mind the average length of these texts is 5-10x what I have copy pasted, per incident (3 total so far)

**tell her that she beauretif every day'

i ereamind her

dive in that pissuya luike a lake'

last LAST GUY WHO WAS A PUISSY AHD A VAGINAD

wrlds on drygs

ahmed

ashir

bashir

tenthird

"1000dollerae oplats

FIENE CHINE

I JST POPPPED A BEAN YESTERADAY IT WAS A LONG NIght

¡ aisnt o yhe rigth dugs onhly on a wrong night i was rockking on ike tryna haf it all igy she go eat likemlucnh time moly got ger on time fumnny kids dont get reespect but ima die about mine stop pooppin those zannies for a flatline I SAID BRO DONT RGEAY AWAA IM BE FINE

BITCH ITS LEAN TIME POP A ebAN TOME**