As you can see, it's a bit hard to go to sleep when you have a new computer :)
This was the first indication the battery or power management unit (PMU) wasn't well - the "Calculating ... Remaining" persisted.
The battery charge indicator on the power supply plug was displaying orange rather than green even though it had been connected all day. It also displayed a small cross in the battery toolbar icon indicating the battery wasn't installed (as below).
The battery was holding charge but the OS wasn't able to read the levels so it resulted in some erratic behaviour like the PC shutting off cold rather than going to sleep like it should when battery power gets low.
I took the machine back to the store and they arranged for a new battery. After three days of running on power I picked up the new battery and saw the same thing happen... annoying.
Apple have a 10 business-day DOA (dead on arrival) policy. Originally the Apple store was saying I'd have to leave it at the store for 2-3 weeks until Apple picked it up but after talking to a couple of other stores, I realised they have to replace it if it's faulty within this period. The laws may differ in your country, so it's worth checking.
I highly recommend doing this if your Mac is playing up.
I returning my Mac on day 10 of the 10 day DOA period and got a brand-spanking new machine.
This one turned out to be good: