Sounds like a seisure. Very strange. I'd see a vet - I hope it's not painful for him. Usually snakes open their mouth/roll over when they're in excruciating pain...