Thoughts churning at night.

Sometimes l wake up in the middle of the night and negative thoughts start pummeling me like a drive by shooting. They are fast and furious and yet I’m sort of half asleep and my prefrontal doesn’t engage. I toss and turn trying to calm my head but it runs wild. Any suggestions as to what to do?