In the Walking Dead series, sometimes zombies seem to be shut down and oblivious to the humans around them. Do the walkers need to sleep?
No, they do not need to sleep. In the comic book they just walk around, hence the name Walkers. There are also zombies in groups called herds, that walk around following a certain sound they heard.
In the TV series, they also walk around, but they sometimes seem to wait; (especially in the city) walking very slowly or appearing to stand, waiting for a typical noise, smell, or visual distraction.
Zombies main advantages over humans is that they do not need to sleep or breathe.
It seems pretty clear that at least most walkers do not need to sleep, or at the very least can go far longer without sleep than any normal human could. Walkers can, and do, go days on end without pause or need for rest. However, it seems that some walkers do enter into a sleep-like state of dormancy.
In the comics, the Survivors discover that there are two general categories of the walking dead: lurkers and roamers.
Roamers tend to move constantly, and frequently seem to congregate in roving herds of varying sizes (some of the herds can be quite massive, such as the one seen at the end of Season 2 of the show). These roamers don't sleep, or even seem to stop moving (except to feed... or when they get stuck in mud until stupid Carl throws rocks at them).
Lurkers, by contrast, tend to be passive until roused. They stand, sit, or lay in one place, and seem completely dormant until prey comes close. The ability for these lurkers to detect prey seems to vary from individual to individual, but can be limited to only what is literally under their nose. This explains the soldier in the tank not reacting to Rick until Rick took the gun from his holster.
It seems that the lurkers can go into a state that seems very much like sleep (although perhaps not all lurkers do this, as the walkers sitting in the church pews seen during the Season 2 premier What Lies Ahead did not seem to be asleep).
Just as pure speculation, perhaps Walkers do sleep, but instead of a daily cycle, the sleep-waking cycle is prolonged drastically, so that they go days or even weeks without sleep, and the lurkers seen in the show and the comics are merely roamers who are sleeping?