Dismissed for centuries, All's Well that Ends Well has found favour of late. Its fourth major revival in the last decade suggests that, as the world hardens, it makes more and more sense. Where Marianne Elliott gave us a folkloric romance at the National nine years ago, Caroline Byrne's candlelit staging turns it into a cracked fairytale. In darkness, she suggests, we can hope for recovery.

Bryne is fast becoming a problem play solver. Having steered her way through The Taming of the Shrew two years ago, she embraces All's Well as another back-to-front love story. Like Kate and Petruchio, Helena and Bertram have an inauspicious start: two grief-stricken kids coupled with an enforced marriage in a gloomy world. When Ellora Torchia's fervent Helena picks him for her prize, Will Merrick throws his head back and hoots, spitting spite at his new wife before running off to get rid of her. It's less cruelty, more hotheaded immaturity and, in a topsy-turvy relationship, adultery as honeymoon, he grows up and grows into love.

This is, in Byrne's eyes, a play about process – nothing as glib as ends justifying the means, but rather a hymn to life's slings and arrows, its learning curves and recovery phases. At first, the king's debilitated and wars rage overseas. Even Hannah Ringham's clown is down in the mouth. Singing is a sign not of joy, but of melancholy and Theo Vidgen's flat, atonal compositions are caterwauled by the cast. Dark times indeed, but light, in the Wanamaker, makes its own meaning and as the world comes good, light fights back in, bouncing off the mirrored floor to fill up the room.

People change, in other words. Boys become soldiers and women mothers. Grief gradually heals. Bryne threads ritual cleansings throughout and a candlelit bath – almost a baptismal pool – rises out of Colin Richmond's set. Helena restores Nigel Cooke's craggy old king to health in it and later receives the same spa treatment herself. Imogen Doel's Paroles, meanwhile, is chastened by piss, changing his cocksure ways after a ritual humiliation.

Tuning into the play's transformations, sprinkling them with magic, Byrne adds an element of fantasy while grounding the play's agonies. Tattoos are key – symbols of lives lived – and there's a beautiful moment when Helena, bound up by two women, grows a bump. Change, here, is as physical as anything else.

That's life, and Bryne's skill lies in embracing the play's moral complexity, refusing the urge to pit heroes against villains. Every character here has their contradictions; some virtues, some vices. Cooke's kindly king has his stern, tyrannical moments, and Doel's Paroles is as sympathetic as preening. Cross-casting queers her: not an alpha-male bragged or in-yer-face dandy, but a misfit making up for her misgivings.

Merrick gives us a gauche young man, whose frustration at forced marriage is both understandable and ugly, and, in Florence, he lets swooning affection tip into lascivious pressure. Torchia, meanwhile, tiptoes round Helena's inconvenient traits (she giggles, embarrassed when dismissing her suitors) to stress her kindness, but I wish the production held her to the same standards. Her bed trick, staged in a strange rubbery black slit, is played more as romantic subterfuge than it is rape. Hasn't she, in a sense, betrayed Bertram right back? To recover from that seems a step too far – a fairytale ending that hasn't quite been cracked.

All's Well That Ends Well runs at the Sam Wanamaker Playhouse until 3 March.