Iran state has zero reason to perform or support these attacks. Last thing in their interest is to incur the wrath of US or other countries and potentially have to endure even bigger sanctions or an attack on their country.
Now, some entities within Iran, but not supported by state, may indeed have their crazy reasons to do such a thing, flaming up hostilities. As pure vendetta or other irrational reasons.
But various entities in Saudi Arabia, Israel or US might also have reasons, more rational ones, to do such a thing. Again, not supported by their respective states.
If we're looking for motifs, like a detective, US has the most to gain with a war happening. They're not dependent on the Gulf Oil. Furthermore, as world's biggest oil producer, with oil from the gulf exports stopping while there's a war, the prices would skyrocket and their own oil would get more valuable. People would still need oil, so US would be able to sell oil to new clients. And even when gulf oil does get back on its feet, getting those old clients back, which now went to US, would not be a sure thing. US would get to keep at least some of those clients. China would be hit, as it imports a lot of oil through the gulf. Which in this era of war through economic means on China is another plus for the US.
US hawks would also get to fulfill their wish and damage or even try to depose the iranian regime, as well as their facilities that might be used for nuclear weapons research.
Even Saudi Arabia is not out of the question, as they also export their oil through other routes, not just through the gulf. They would also profit if their other colleagues from the gulf can't sell suddenly. That might make their position in the middle east even stronger.
I want to reiterate that none of these are likely state sponsored. In all likelihood it's more like rogue, though possibly influental, organisations plotting wars. Not unlike James Bond movies, however crazy that may sound.