There are indeed some odd specimens in the long list of oaths under the entry god in OED but this one takes the biscuit.
† God’s hat int. Obs.
1569 T. Preston Lamentable Trag. Cambises D iv b Gods hat neighbour come away.
I assume the crown of thorns is referenced but I can’t erase from my mind the image of God trying on hats in a celestial hatter’s. “What’s this one look like? Does it suit me?” Mighty chorus of assent from massed ranks of seraphim and cherubin.
OK, I’ll leave quietly.