When Pilate heard of Galilee, he asked whether the man were a Galilaean.
And as soon as he knew that he belonged unto Herod's jurisdiction, he
sent him to Herod, who himself also was at Jerusalem at that time. And
when Herod saw Jesus, he was exceeding glad: for he was desirous to see
him of a long season, because he had heard many things of him; and he
hoped to have seen some miracle done by him. Then he questioned
with him in many words; but he answered him nothing. And the chief
priests and scribes stood and vehemently accused him. And Herod with his
men of war set him at nought, and mocked him, and arrayed him in a
gorgeous robe, and sent him again to Pilate. (Luke 23 v 6 11)
Luke is the inspiration here: none of the other gospels refer to Christ
being sent to Herod.