There has been no formal announcement from the Moroccan authorities, but officials are quoted as saying the men had been arrested in May with the help of the intelligence services of several friendly countries.
Reuters news agency also reported that two Moroccan women - the wives of two of the men - were arrested on Monday and were being interrogated.
The women allegedly acted as couriers and "were aware of what the men were doing", it quoted an unnamed official as saying.
The names of the detainees were not released.
The men, aged between 25 and 35, are reported to have links to al-Qaeda, the organisation suspected of carrying out the 11 September attacks in the United States.
Officials, speaking on condition of anonymity, said the suspects planned to sail inflatable dinghies loaded with explosives alongside ships patrolling the straits.
In October 2000 two suicide bombers, suspected of being members of al-Qaeda, carried out a similar attack against the USS Cole in Yemen killing 17 sailors.
The suspects were planning to sail from Ceuta and Melilla, the Spanish enclaves on Moroccan territory, the officials said.
The British Foreign Office issued a statement welcoming "the arrests if they involve individuals who may have been planning terrorist attacks against UK assets".
The UK Ministry of Defence said it had no knowledge of specific threats to Royal Navy ships.
A French judicial official on Monday confirmed the existence of "an anti-terrorist police operation in liaison with Western interests in the Strait of Gibraltar".
Joint operation
The arrests in Morocco were made with the help of intelligence services of "several friendly countries," one official told the Associated Press news agency.
The men placed under arrest are not wanted in any other country, sources said.
The three are reportedly being held in custody in Casablanca prior to their interrogation.