This is very frustrating. We need a fix!
I have a MacBook in clamshell mode + 2 external displays and half the time when waking from sleep one of my external displays isn't detected. Here's my workaround:
Put mac to sleep
Turn off both displays
Turn on both displays (one takes longer than the other so I time it so that both finish booting up at roughly the same time)
At the right moment, when both monitors have just finished booting up, wake Mac from sleep
Works ~80% of the time.