Increasing the activity of neurons could be beneficial in people with the disease, researchers at a Scottish university said.
It could stimulate the production of a substance that protects nerve fibres.
The finding could pave the way for new treatments, the Edinburgh-based researchers said.
Multiple sclerosis affects the brain and spinal cord and can cause problems with balance, movement and vision.
It can lead to high levels of disability and impaired life quality.
Information in the brain is transmitted along nerve fibres known as axons.
A material called myelin forms a layer around axons, which keeps the 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 said.
The researchers examined how changes in the activity of neurons affects how much myelin is produced in the brains of zebrafish.
Decreased brain function reduced the amount of myelin made, while production was increased by around 40 per cent when the neuronal activity of fish was increased, the team said.
Before they can develop new therapies, the team says it needs to learn more about how brain function controls the complex processes by which axons are coated with myelin.
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.
Dr David Lyons, of the University of Edinburgh's Centre for Neuroregeneration, who led the study, said: "We have a long way to go before we fully understand how our brain activity regulates myelin production, but the fact that this is even something that the brain can do is a good news story.
"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 Sigrid Mensch, one of the Edinburgh-based authors of the study, also said it was unclear at this stage when the research could be applied to treatment but that the breakthrough is significant.
She said: "We really can't make a prediction, but we are definitely very excited about the results."
Dr Emma Gray, Head of Biomedical Research at the MS Society, said: "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."
The Centre for Neuroregeneration, where the research was conducted, works closely with the neighbouring Anne Rowling Regenerative Neurology Clinic - although this study was run separately - which was set up by a £10 million donation from the Harry Potter author whose mother died of multiple sclerosis at the age of 45.
An earlier study showed women are more likely to have multiple sclerosis than men, accounting for 72 per cent of cases, and it is most commonly diagnosed when a patient is between the ages of 40 and 50.
Scotland has one of the highest incidences of MS in the world, with some experts linking it to the lack of naturally occurring vitamin D because of a lack of sunlight.
Read more at Harold Scotland