There are few actresses I'd rather spend an hour and a quarter with than Zoë Wanamaker, Barbara Flynn and Nina Sosanya. For the pleasure of their company alone, Nick Payne's new play Elegy is time well spent.

But the writer offers a meaty issue to chew on as well. Returning again to the subject of the brain and memory which served him so well in his huge international hit Constellations, he asks the biggest existential question of all: where does the self reside? Or as Wanamaker's Lorna asks at one point: "What binds me to me?"

The dilemma is posed by the fact that, in a scenario set in the near future, Lorna has had an operation to cure an unnamed fatal illness that was giving her symptoms similar to those of Alzheimer's. The only problem is that in removing gray matter and implanting a micro chip to restore function, Sosanya's chilly doctor Miriam has cut out all Lorna's memories of the past 25 years - which is exactly the amount of time she has spent with her wife, Carrie, played by Flynn.

When we first meet them, in Tom Scutt's institutional setting, dominated by a grey floor, waiting room chairs and a tree stump in a glass case, glowing from within, Lorna has already had the "procedure" and become a healthy ghost, someone who has her life back, but no longer remembers the woman she once loved.

The play then unfolds backwards, twisting neatly in ways that it would be a shame to reveal, full of thoughts about love, death, the nature of self, the condition of faith and the possibilities of a good death. When it finally returns - cleverly - to its opening scene, we understand it much better.

All the big issues are there. Is this operation simply like pain relief or is it a diminishing of life itself? How can loved ones make the right decisions on behalf of someone who is losing their mind? Is life at any cost better than simply coping with the mess? To provide an undertow, it enlists poetry in its cause, quoting both Douglas Dunn's Elegies and Christopher Reid's A Scattering, both collections that mourn the early death of a wife - and from Alice Osvald's Wedding which concludes "like a wedding, which is like love, which is like everything."

But the inclusion of those poems indicates a problem with the play. It is admirably poised, and unsentimental and Josie Rourke's delicate, understated direction is of a parcel with the restraint of the piece. Yet in the final analysis it is too schematic, lacking the emotional and intellectual heft that its cleverness leads you to hope for. These people are interesting enough to make you want to invest in their lives, not skip through them.

It is, however, most beautifully acted. Wanamaker's is the showier turn, convincingly confused, movingly resolute, but Flynn's quiet despair, her depiction of a loving pragmatist facing something she cannot bear is equally effective. Sosanya makes the doctor's case with powerful conviction and steely grace. You just long for more.

Elegy runs at the Donmar Warehouse until 18 June.