Probably a bit spooked by something and just "on guard" waiting to see what happens next. They freeze when they're scared, as movement is less likely to attract the attention of a predator.
It's one of the thingss I explain to small children when I tell them not to knock on the glass of my vivs. The kids think a knock will startle the snake into moving, when in reality, it just makes them stay absolutely still even longer.