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.