The judge described Sayed Miah's horrifying attack as "the stuff of nightmares"