Increasing the activity of neurons could be beneficial in people with the disease. It could stimulate the production of a substance that protects nerve fibres.
The finding could pave the way for new treatments.
Multiple sclerosis affects the brain and spinal cord and can cause problems with balance, movement and vision.
Information in the brain is transmitted along nerve fibres known as axons.
A material - called myelin - forms a layer around axons, which keeps them healthy and helps speed up the transfer of information. Damage to myelin contributes to diseases of the brain such as multiple sclerosis.
Until now, it was not known how brain activity controls production of myelin by specialist cells. Researchers examined how changes in neuronal activity affect how much myelin is produced in the brains of zebrafish.
Decreased brain function reduced the amount of myelin made, while production was increased by 40 per cent when the neuronal activity of fish was increased.
'We are hopeful that one day in the future we may be able to translate this type of discovery to help treat disease and to maintain a healthy nervous system through life.'
Dr David Lyons, School of Biomedical Sciences, University of Edinburgh
Before they can develop new therapies, the team needs to learn more about how brain function controls the complex processes by which axons are coated with myelin.
"The more we learn about how myelin production happens in the brain, the more chance we have of developing effective and targeted therapies to repair myelin in people with MS."
Dr Emma Gray, Head of Biomedical Research, MS Society
The study, published in the journal Nature Neuroscience, was funded by The Wellcome Trust, the Biotechnology and Biological Sciences Research Council, and the Lister Research Prize.
Source: University of Edinburgh