I took several years of Suzuki piano method when I was a kid. Suzuki focuses initially on developing the ear.
During lessons, we did this kind of stuff all the time. I would close my eyes and my instructor would play a series of notes and I would need to play them back by ear.
I would also listen to whatever song I was learning before I went to be bed and again when I woke up in the morning, visualizing every note.
Give me a guitar today and I can work out pretty much any song I hear on the radio in under a minute just by listening.
EDIT: To be clear, I also played a LOT of guitar and piano. Ear training was in addition to the hard work of becoming a player.
It's really a great way to train your ear, and fun, too. I can play ukulele, but mostly just to strum and play songs to, but a few years ago I just started picking notes to try to recreate melodies of songs I knew or heard recently. At first it was slow-going with lots of searching on the fret for the right note, but over time I worked up the skill to mostly get the melody on the first few tries. It was the most amazing feeling to realize I could listen to a song and then reproduce it by ear.
I found that it's also an excellent way to "feel" the structure of a melody as well since you're essentially building it up again. Of course you could read music to see the actual melody, but working it out this way feels a bit more intimate.