The father, who lives in Hertfordshire but cannot be named for legal reasons, was awarded custody of the boy and girl in February this year.
He concluded there was a danger she might 'set up home with a man she hardly knew' and 'uproot' her children, aged three and four, in order to fulfil her desire to be loved.
Yesterday Lord Justice Thorpe, sitting with Dame Elizabeth Butler Sloss at London's appeal court, upheld the decision to place the children with the 'more stable' father.
He said the judge was entitled to conclude there was a danger the mother might move out of Hertfordshire to live with a man she met online, and this would involve upheaval for the children.
Lord Justice Thorpe told the court how the children's parents married in the early 1990s, but their relationship crumbled a couple of years ago.
The mother, who wept as the court gave its ruling, had given up work to become the 'primary carer' - but as the couple went through divorce proceedings the father applied for custody of the children.
After hearing of the mother's use of the internet to meet men, and the help the paternal grandmother was prepared to give to the father, the county court judge awarded him custody of the children.
Earlier Patricia Roberts, for the mother, had complained that the county court judge was 'irrational' in awarding custody to the father.
She said the social worker investigating the case 'was of the view that it was in the children's best interests to remain living in the former matrimonial home with the mother caring for them.'
She added that the mother had given up work to look after the children, and the father had had limited contact with them because he didn't return from the office until 7pm.
But Lord Justice Thorpe said the county court judge was 'perfectly entitled' to come to the decision he did after taking into account that there would still be 'abundant' contact with mother.
Dame Elizabeth warned that parents involved in custody disputes often ignore the mental consequences of court proceedings on youngsters.
'Those children have the misfortune that their parents can't get on, and we tend to overlook the degree to which children are ill-treated in this way by parents,' she observed.
'Children are always in a second best situation if the come before the courts.
'Often parents aren't sufficiently mature, grown up and sensible enough to try and make an arrangement which doesn't make either feel down-graded or under-valued.'
STRAND NEWS SERVICE