A mother-of-six with learning disabilities can be sterilised, a judge has ruled.