Back in the later years of the 19th century, physicists had put together an incredibly successful synthesis of electricity and magnetism, topped by the work of James Clerk Maxwell. They had managed to show that these two apparently distinct phenomena were different manifestations of a single underlying "electromagnetism." One of Maxwell's personal triumphs was to show that this new theory implied the existence of waves traveling at the speed of light -- indeed, these waves are light, not to mention radio waves and X-rays and the rest of the electromagnetic radiation spectrum.
The puzzle was that waves were supposed to represent oscillations in some underlying substance, like water waves on an ocean. If light was an electromagnetic wave, what was "waving"? The proposed answer was the aether, sometimes called the "luminiferous aether" to distinguish it from the classical element. This idea had a direct implication: that Maxwell's description of electromagnetism would be appropriate as long as we were at rest with respect to the aether, but that its predictions (for the speed of light, for example) would change as we moved through the aether. The hunt was to find experimental evidence for this idea, but attempts came up short. The Michelson-Morley experiment, in particular, implied that the speed of light did not change as the Earth moved through space, in apparent contradiction with the aether idea.
So the aether was a theoretical idea that never found experimental support. In 1905 Einstein pointed out how to preserve the symmetries of Maxwell's equations without referring to aether at all, in the special theory of relativity, and the idea was relegated to the trash bin of scientific history.
Aether was a concept introduced by physicists for theoretical reasons, which died because its experimental predictions were ruled out by observation. Dark matter and dark energy are the opposite: they are concepts that theoretical physicists never wanted, but which are forced on us by the observations.
Dark matter, in particular, is nothing at all like the aether. It's something that seems to behave exactly like an ordinary particle of matter, just one with no electric charge or strong interaction with known matter particles. Those aren't hard to invent; particle physicists have approximately a billion different candidate ideas, and experiments are making great progress in trying to detect them directly. But the idea didn't come along because theorists had all sorts of irresistible ideas; we were dragged kicking and screaming into accepting dark matter after decades of observations of galaxies and clusters convinced people that regular matter simply wasn't enough. And once that idea is accepted, you can go out and make new predictions based on the dark matter model, and they keep coming true -- for example in studies of
Dark energy is conceptually closer to the aether idea -- like the aether, it's not a particle, it's a smooth component that fills space. Unlike the aether, it does not have a "frame of rest" (as far as we can tell); the dark energy looks the same no matter how you move through it. (Not to mention that it has nothing to do with electromagnetic radiation -- it's dark!) And of course, it was forced on us by observations, especially the 1998 discovery that the universe
is accelerating, which ended up winning the Nobel Prize in 2011. That discovery took theoretical physicists around the world by surprise -- we knew it was possible in principle, but almost nobody actually believed it was true. But when the data speak, a smart scientist listens. Subsequent to that amazing finding, cosmologists have made other predictions based on the dark energy idea, which (as with dark matter) keep coming true: for the cosmic microwave background again, as well as for the distribution of large-scale structure in the universe.
There is still much we don't know about dark matter and dark energy; in particular, we certainly haven't nailed down what exactly they are (although we have many plausible ideas), and the only way we've detected them is indirectly, through their effects on gravitational fields in the universe. But they are not arbitrary; both ideas make very specific predictions for what those gravitational effects should be, which astronomers have tested and verified. Unlike the aether, which shrunk and eventually disappeared under experimental scrutiny, the case for dark matter and dark energy continues to grow stronger.