Media playback is unsupported on your device Media caption Watch and listen: Scientists bring the singing fish into their lab

When California houseboat residents heard their low, submarine hum in the 1980s, they thought it might be coming from noisy sewage pumps, military experiments or even extraterrestrials.

But this was the nocturnal hum of the midshipman fish; a courtship call, and the source of a biological secret scientists have now solved.

Researchers brought the fish into their lab to work out why they sang at night.

The US team's findings are published in the journal Current Biology.

Chemical clock

The researchers found the singing was controlled by a hormone that helps humans to sleep - melatonin.

And looking more closely at how melatonin acts on receptors in different parts of the fish's brain could help explain why it is such a powerful "chemical clock" with a role in the timing of sleep-wake cycles, reproduction and birdsong.

Prof Andrew Bass, who led the research, said his curiosity about midshipman fish had been piqued by a paper written in 1924 by an academic called Charles Greene, which described how the male fish would hum at night.

"Greene referred to midshipman as the California singing fish," said Prof Bass.

"We discovered that females are also sonic, but it's only territorial males that build nests and produce the hum to attract females to [those] nests."

Nocturnal calling

Image copyright A Bass Image caption Midshipman got their name because the luminescent 'photophores' reminded early observers of the buttons on a naval academy midshipman’s uniform

To find out if the humming was controlled by an internal clock, or circadian rhythm, the team first kept a group of midshipman fish in constant light.

This almost completely suppressed their humming.

"But when [we gave the fish] a melatonin substitute," said Prof Bass, "they continued to hum, though at random times of day without a rhythm.

"Melatonin essentially acted as a 'go' signal for the midshipman's nocturnal calling."

Courtship song

Limiting their foghorn-like serenade to the night time probably benefits the fish; a nocturnal chorus might be timed for when females are most receptive, or when their predators are less likely to hear.

But the study also suggests a broad and fundamental role for melatonin throughout the vertebrate kingdom - finding a fish with a behaviour so intrinsically linked to their body clock suggests this brain circuitry evolved in our most primitive, aquatic ancestors.

Dr Ni Feng, from Yale University, who was also involved in the study, said: "Melatonin is the same supplement that humans might take to fall asleep easier and get over jetlag faster.

"But in the nocturnal fish, like the midshipman, it serves to wake them up and pave the way for their nocturnal courtship song performance.

"[So] our study shows that singing fish can be a useful model for studying hormones and reproductive-related vocal communication behaviours shared by many vertebrate species."