You would think that the word must date back to Anglo-Saxon times, but in fact "dream" is surprisingly mysterious. There was an Old English word "dream", but it meant "joy, pleasure, rejoicing" and also "music or song" (we have already seen with the word "glee" this connection between joy and music). The related verb also meant "behave in a drunken manner", but I shall gloss over that quickly.
It is possible that these Anglo-Saxon words morphed into "(events you) see in your sleep", but as these latter usages of "dream" didn't crop up till the 1300s, the connection is tenuous. The Anglo-Saxons used the words sweven, meting, or i-sight for what we call dreams.
Another question about "dream" is: are the past forms "dreamt" or "dreamed"? Both seem to have existed since the Middle Ages. "Dreamed" is now much more common than "dreamt" in all varieties of English, but "dreamt" continues to plug along, less commonly used in American English than in other varieties. I'd be interested to know (in the comments) which one you use, and if it depends on whether you're saying "Last night I [had a dream]" or "In my wildest imaginings I never would have [thought] I'd be a ballerina".
As for nightmares (like me being a ballerina), they have nothing to do with horses. "Mare" in this case was an Anglo-Saxon word for an evil spirit who was believed to suffocate people in their sleep.
But speaking of equines, here's a cute video from Dutch National Ballet, showing a day in the life of "Bottom" in Sir Frederick Ashton's charming Dream.
P.S. If you find the English language fascinating, you might enjoy regular updates about English usage and word origins from Wordlady. Receive every new post delivered right to your inbox! If you have not already subscribe, you can either:
use the subscribe window at the top of this page
(if you are reading this on a mobile device): send me an email with the subject line SUBSCRIBE at firstname.lastname@example.org
Follow me on twitter: @thewordlady