The mother said she was tricked by a doctor into believing she had given birth while sedated, after she went to Nigeria for fertility treatment.
The local authority had claimed the couple’s story was a “charade”.
But the judge ruled they were victims of an “appalling scam”.
The presiding judge Mr Justice Coleridge added the case was “extraordinary, bizarre and worrying”.
Charities meanwhile have raised concerns about the judgement, warning it may encourage trafficking.