Summer is an intense time for blue whales off the coast of central California. During the daytime, the enormous marine mammals must gobble up tons of krill daily to prepare for their epic migration to warmer southerly waters. And by night the males serenade their female counterparts.

However, their singing schedule is upended when it’s time to start traveling, indicates a study published October 1 in the journal Current Biology. Scientists tracked whale movements and songs over several years, and found that whales switch from singing at night to caroling during the daytime when they begin migrating. Tracking the transition between the two song styles may help us protect these endangered animals as they move towards busy shipping lanes.

“There is a near real-time signal of what these animals are doing out in a habitat that’s historically been really difficult to observe,” says William Oestreich, a PhD candidate in biology at Stanford University and coauthor of the new study. “Potentially we could give some advance notice to folks managing these ecosystems in southern California that, hey, we’re hearing the blue whales start to migrate south, you might have a lot of them showing up here quite soon.”

Blue whales are the largest animals on the planet, and each year they undertake one of the longest migrations. After spending the summer in the Northeast Pacific, the whales travel thousands of miles to their breeding grounds off the coast of Central America.

“Packing on the calories by just feeding constantly on krill…during the summer is really critical to fueling their year-round life cycle,” Oestreich says. “It’s really important for blue whales to match the timing of their feeding season up north with the bloom of krill life that occurs here, and to head south as these krill populations are decreasing once again.”

To learn more about these behaviors, Oestreich and his colleagues planted an underwater microphone, or hydrophone, just outside Monterey Bay and recorded whale vocalizations over five years. The team also monitored the behavior of 15 singing whales over periods of days to weeks. The tags the researchers stuck on the whale’s backs included GPS trackers, pressure sensors, and accelerometers, which detect fine-scale vibrations that can reveal when a whale is singing.

Only male blue whales are known to sing, but both sexes move southward at about the same time each year. Males and females have also been spotted pairing up and feeding together shortly before the migration begins. “That gives us some confidence that the sounds that are primarily being produced by males are fairly representative of what the whole population is doing,” Oestreich says.

During the summer, the songs picked up by the hydrophone took place mostly at night. The intensity of the songs reached a peak each year between October and November. However, as winter approached and the songs dwindled, the whales switched to singing during the daytime.

The behavior of the tagged whales echoed this pattern. During the summer days, the whales dove to great depths in search of krill. Once night fell, the whales hung out near the surface and sang for hours on end. The researchers were able to track two of the whales over several weeks, and observed them suddenly stop feeding in late fall. Within a day, the whales had transitioned to singing during the day while making a beeline southward.

During the summer, blue whales spread out over vast distances while foraging. By eavesdropping on their distant neighbors at night, the whales may gather information about foraging conditions elsewhere in their range. Knowing when other whales are on the move could guide their decision about when to stop hunting for krill and start their own journey towards milder waters.

By tuning in too, we might be able to forecast when the whales will arrive in areas where they’re in particular danger of running into ships, such as the Santa Barbara Channel. “There has been a quite noticeable number of fatal collisions between ships and blue whales,” Oestreich says. “That could be one piece of the puzzle to more dynamically manage those habitats and shipping lanes in a way that allows shipping to continue, but also in a way that is safe for these whale populations.”

How blue whales time their migration could be key to their ability to respond as climate change alters their habitat and prey distribution. “One of the things we are really curious about now is trying to understand how flexible and adaptable these whales are to changes in this ecosystem,” Oestreich says. Scientists have recently observed marine heatwaves in the Northeast Pacific. While it’s not clear what this means for the krill, he says, “This is the type of rapid change that a lot of animals, blue whales included, will have to be adaptable to in order to survive.”