Of the three shows with music and lyrics by Stephen Sondheim and book by James Lapine, this has always been the most popular, and the most problematic. The stock charge is that a punchy first half is followed by a preachy second. Timothy Sheader's dazzling revival solves the difficulty in two ways: by exploiting the scariness of the park after dark, and by seeing the action through the fevered imagination of a boy narrator.

The show starts with the troubled boy fleeing a parental spat. Squatting alone on the edge of a forest, he conjures up a jumbled fairytale: a baker and his wife, to lift a witch's curse of childlessness, are sent in pursuit of Cinderella's slipper, Little Red Riding Hood's cape, Jack's cow and Rapunzel's hair. But, once the mission is accomplished, the boy beds down in a sleeping-bag to experience a genuine nightmare. What, he wonders, if the happy-ever-after world were to be threatened by a dead giant's vengeful wife, marital conflict and sudden death?

Sheader's concept unifies the show and reminds us that fairytales are often a projection of childhood fears. Soutra Gilmour's design also brilliantly exploits the sinister beauty of the outdoor setting. Quivering branches evoke the birds that haunt Cinderella's brain and that peck out her sisters' eyes; Rapunzel occupies a secluded bower from which her corn-yellow hair dangles like a silken ladder; and the marauding giant (voiced by Judi Dench) emerges from the treetops with luminous eyes made of dustbin lids and bicycle wheels. For once, the show seems all of a piece; and the treatment of the woods as a place teeming with Bosch-like figures camouflages the fact that Sondheim's score, although well projected under Gareth Valentine's musical direction, is full of tantalising motifs that rarely develop into a satisfying song.

One shining exception is Agony, which wittily punctures the pretensions of two popinjay princes and is excellently delivered by Simon Thomas and Michael Xavier. The latter doubles as a child-molesting wolf who both scares, and dangerously excites, Beverly Rudd's jovially greedy Little Red Riding Hood. Vivid impressions are also made by Hannah Waddingham as a witch who caresses her daughter with long, prehensile claws, and by Mark Hadfield and Jenna Russell as the fractious baker and his wife. A flawed musical has been intelligently reclaimed as a late-summer night's dream that suggests fantasy is the first refuge of the psychologically damaged.