My 2013 is still doing it almost 3 years later. This has always been a not waking up thing, not a going to sleep while in use thing. It began almost right out of the box with Mavericks. I went online then and found other complaints and zero solutions. It's really galling when Apple Care says they've never heard of that problem - it's impossible that they haven't heard.
So I upgraded to El Capitan - same thing. It will go days or months without a problem, and then return to its usual black screen with no apparent reason - can't power the thing down, I've laid on the power button for 15 minutes with no result. I've never even actually put it to sleep with the drop-down command; in Preferences I've set it to never go to sleep, I've set it to go to sleep after a certain number of minutes, every possible permutation of those commands. Tried every combination of keys I can think of.
Get this - had the motherboard replaced twice. The battery was replaced. No change. It can't be relied on to work when I want it to - like we want to stream a movie and the pizza's getting cold as I try to make the dang thing wake up.
Over the years I keep searching for answers, and Apple has never even acknowledged there's a problem as far as I know. The only thing I haven't done it shake it - but like one poster said it has a solid-state drive, not a spinning wheel.
It happens if it's been asleep for a long time with the lid open or closed; or just if I close it to take it into the next room, it won't come back - or it will. IOW, it wakes up when it feels like it. No pattern to it except that it seems really dead. And then it will just come back on after 5 minutes or 5 hours as if to say "I've been here all the time, where have you been?"
I never know when it will happen next, I feel like I should set it to never sleep and never have the display go off, but that probably wouldn't work either because the next time I close it...it won't wake up.
It's still under Apple Care - can I exchange it for a new one? Probably not. Not that the new ones will work any better.