Why does sex help migraines?

Be

I get migraines bad sometimes headaches. We read sex helps and tried it. All better! Well for several hours then it came back. But why does sex momentarily make the headache or migraine go away? A friend does this as well. I wonder if it has to be sex or toys can do it too? But like why is this?