Thank for all your help. I've found it.
It was Terry Nation's Botany Bay, in Boris Karloff's sf series Out of this world. Sadly it apparently hasn't survived, but hopefully some old reel will turn up one day in a loft or garage.
See the following at http://www.britishtelevisiondrama.org.uk/?p=213
Nation also wrote the first of only two original scripts presented by the
series. Botany Bay was a horrific tale with some effective plot twists and direction. The Times’s ‘Special Correspondent’ noted that the play was “Particularly disturbing”, reporting how Guy Verney’s direction derived “the maximum effect from keeping us – literally as well as metaphorically – very much in the dark.” Set in a sinister psychiatric institute, the story concerned aliens transferring their minds into those of the inmates.
The final twist reveals that the story is not in fact set on earth after all. The Special Correspondent found it as gloomy as previous episodes, “doubly so, in fact, since not only did we see intelligences – apparently evil intelligences – from another planet triumphing over ordinary people like you and me, but worse, by an ingenious twist at the end we were made to realise that we ourselves, the inhabitants of earth, were the sinister intruders on some simpler future world: that not only were the wrong ‘uns winning, but they were us after some further centuries of decadence.” As an original and intriguing teleplay in a series largely comprised of adaptations it is particularly sad that no recording of this instalment survives.