I have a 2 day old Macbook Pro, quad core i7, Yosemite. I closed the lid this morning with the power supply plugged in and iTunes, iTerm, and Safari idling. I opened the lid tonight and the screen and back of the computer were warm and it wouldn't wake from whatever 'power saving' state it was in. I had to hold down the power button for about 15 seconds before it restored. Any idea what this could be? I am very anxious about this behavior given Macbook Pro's reputation and price tag and the age of this computer. Thanks.
One thing for sure: it shouldn't act like that.
Beside that it'll be hard to say what was going on - seems like it was overheating (was the fan running?) and didn't want to start working before cooling at least a bit.
There might be a lot of reasons for that, but keep a close eye on your machine behaviour - should it happened again - definitely get it serviced since it's a brand new machine.