At night, just after the full moon, teams of scientists dive beneath the waves to study one of the planet’s most prolific and mysterious rites of reproduction.

It’s coral behaving badly — or very nicely, depending on your point of view. Warm ocean waters suddenly teem with trillions of eggs and sperm that swirl in the currents and merge to form new life, a profligate frenzy that can leave the ocean’s surface awash in pink flotsam.

Globally, hundreds of species of coral engage in primordial rites of mass spawning tied to seasonally warming waters and the lunar cycle.

“It’s like an underwater snowstorm,” said Emma L. Hickerson, a veteran diver and research coordinator at the Flower Garden Banks, a coral reef 100 miles off Texas in the Gulf of Mexico.

Corals are giant colonies of tiny creatures. Each small animal has a central mouth and feeding tentacles, and secretes a stony substance around its base that binds the colony together. The reefs nurture a riot of marine species and fish stocks that feed millions of people.

Studies of the procreative dance are considered vital for helping save beleaguered coral reefs around the globe, including the Great Barrier Reefoff Australia. It has suffered repeated bouts of mass bleaching, mainly attributed to declining water quality and rising temperatures because ofclimate change. The hope is that a better understanding of coral reproduction will aid recovery, and strengthen efforts to limit coastal pollutants and sediments that can interfere with successful coral spawning.

“A big concern is the ability to recover from the severe bleaching events,” said Emily Howells, a coral researcher at New York University who studies the reproductive cycle.

The spectacular nature of the rite can make the research seem all the more urgent. A lucky diver waiting for the annual event might see a coral head laden with individual sex cells that look visibly swollen and ripe for release.

“Then, all of the sudden, one goes off and, poof, they all do,” said Ms. Hickerson of Flower Garden Banks. “They all release at the same time.”

“It’s like a wave at a stadium,” she added. “You see it start at one side and go across. It’s amazing. You can’t make this stuff up.”

In nighttime dives of recent years, videographers, including Ms. Hickerson, have taken lights and cameras beneath the waves to document the natural wonder, at times zooming in so close that viewers can see the swelling and release of individual eggs.

Coral spawning in Curaçao, Netherlands Antilles, where it normally occurs in September and October.CreditWild Horizons/UIG, via Getty Images

Shallow reefs are the main venue. But scientists in recent years have also deployed tethered robots to survey deep reefs. Surprisingly, given the diminished light and cooler temperatures, they have discovered that deep corals can also spawn as a group, at times in synchrony with their shallow kin.

“Many people thought mass spawns did not occur in many places,” said Sally A. Keith, a coral ecologist at the University of Copenhagen. “It’s amazing how little is known about such a large-scale phenomenon.”

Punctual Reproduction

As often in romance, timing is everything. If corals shed their sex cells just minutes out of sync with neighbors, the odds of reproductive success are greatly reduced.

Indeed, scientists have discovered that the group sex can be remarkably punctual, its onset typically at a precise but poorly understood time after dusk. A brain coral at Flower Garden Banks released its gametes within two minutes of its reproductive frenzy the previous year.

The liberated eggs and sperm are buoyant. They float upward through warm ocean waters to merge near the surface and, at times, form giant pink slicks containing millions of coral embryos. Recent studies have shown that the drifting youngsters can ride surface currents for hundreds of miles and descend to found new colonies and reefs.

While scientists have learned a lot since discovering the rite decades ago, much remains unknown, especially about the exact mix of environmental factors that trigger the synchronized frenzies, which scientists callbroadcast spawning.

Some researchers, divers and spectators have waited patiently for coral mingling that, at least during their visits, never materialized.

Last month, Dr. Keith and 11 colleagues issued a note of caution in Proceedings of the Royal Society of London, considered the world’s oldest publisher of scientific journals. Disentangling the proximate cues and underlying mechanisms, they wrote, “remains a significant challenge.”

That dogma began to crumble when graduate students at James Cook University in Australia followed a trail of clues to a nighttime mass spawning event on the Great Barrier Reef. In 1984, their discovery made the cover of Science magazine.

Scientists speculated that the moon’s phase was important in the ritual because it controlled the tides. But the tides during spawning events turned out to be low in some places and high in others, and scientists now say the moon most likely acts as a visual stimulus to the choreographed sex.

How do eyeless creatures monitor the moon’s phases and determine when the time is right to start mingling?

The breakthrough came after Oren Levy, a young Israeli scientist, traveled to Australia to study at the University of Queensland. Dr. Levy was fascinated by a class of photoreceptors known as cryptochromes. Originally found in plants, they had also been identified among insects and mammals. Dr. Levy wondered if corals might possess the complex molecules as well.

In 2007, he and six other scientists from Australia, Israel and the United States reported in Science that corals do have primitive photoreceptors, if not true eyes. In experiments, they found that the photosensitive chemicals responded to moonlight as admirably as, well, human lovers.

Increasingly, scientists track how environmental changes can disturb the procreative dance. In papers in December and February, a team of Swiss and Australian scientists reported that sediment particles from dredging and other ocean disturbances can adhere to eggs and sperm, blocking their journey to the surface and reducing the odds of successful fertilization.

“The potential of sediments to sink coral gametes,” the scientists wrote, “highlights the need to carefully manage the timing of turbidity-generating human activities near reefs during spawning periods.”

The Role of Seasonal Temperatures

Another recent finding concerns the central role of rising seasonal temperatures. Scientists tracking the rite globally have found that, in the Northern Hemisphere, the reproductive frenzy moves northward in a wave as springtime warmth starts to raise the temperature of normally cool ocean waters.

With notable exceptions, the peak season of mass coral spawning seems to run from January to March in low latitudes, March to May in middle latitudes, and June to October in high latitudes.

Dr. Howells of the New York University branch in Abu Dhabi, joined colleagues to map the latitude effect for reported spawning events in the Indian Ocean and its arms, as well as the Red Sea. The rising warmth, they said in a recent paper, coincided with the northward movement of the seasonal rite.

The team focused its own research on the Gulf of Oman, a northern arm of the Arabian Sea. During 2013, the reproductive whirl began in April. But the next year, it started in May.

Why the month long delay? The team reported that the average sea temperature at the study site before the 2014 event was cooler by 1.5 degrees Celsius, or 2.7 degrees Fahrenheit. The reproductive lag, the scientists reported, most likely arose from coral responding to “the optimal temperature window.”

The team studies the relatively warm seas of the Middle East as a laboratory for understanding how climate change might affect reefs elsewhere. This week in Hawaii, an international conference of more than 2,000 reef scientists, policymakers and others are struggling to find better ways of protecting the vital ecosystems. NASA this year began flying an instrument-laden jet to map global coral reefs as a means of monitoring their health.

Spawning Tourism Trade

In the Florida Keys, at relatively high latitudes, the reefs tend to go into their reproductive phase in late summer.

Last year, the big day off Key Largo turned out to be Aug. 5, five days after the full moon of July 31. Divers marveled as staghorn corals, a spiky reef builder that can grow as much as eight inches a year, released clouds of eggs and sperm.

Research teams and dive companies try to predict the exact time these love-fests happen, since they’ve become tourist attractions. “Space Available on One-of-a-Kind Reef Trips to See Coral Spawning,” said a headline atreef.org, an environmental foundation in Key Largo.

The prospective full moon this year is Aug. 18, and tentative forecasts for Key Largo point to late that month for the reproductive frenzy.

Ms. Hickerson, of Flower Garden Banks, one of 14 marine parks run by theNational Oceanic and Atmospheric Administration and the northernmost coral reef on the nation’s continental shelf, expects the big night to be Aug. 25.

“I always breathe a sigh of relief when I make a prediction and the corals actually spawn,” she said.

It was roughly two decades ago when Ms. Hickerson first dived beneath the waves at Flower Garden Banks to witness a mass spawning. Despite seeing it many times, she said, she still finds herself getting caught up in the primal thrill.