A friend who served in the IDF Navy told me that some soldiers there believed it was bad luck to whistle while at sea, because it might infuriate Neptune. Supposedly it was like whistling at his wife or something.1
Googling whistling and sailor superstitions brought up some results, but nothing that connected Neptune or Poseidon to this. Whistling apparently helps bring strong winds that are good for sailing (source)(source) but may also cause storms. (source)
I was wondering if there was any historical basis for this superstition or is it some niche, modern invention made by taking a few different superstitions and slapping them together?
1 We were both aware of the irony of this superstition existing in a country that's based on an ethnic-religious group whose religion is one of the oldest monotheistic ones around. As such, he told me that he used to whistle out at sea just to annoy the superstitious soldiers and officers and even did it on the comms link a number of time so officers on other boats would hear it too.