How did it get fixed? If you're continually having issues that could be based around the power supply, then I'd take it in to Apple and ask for a replacement. A bad power supply can
potentially (although not usually) wreck a lot of other components on your machine so it's something that should probably be sorted out. If it's fine at the moment, then let it be, but if it plays up again I'd take it straight back to Apple.
When a Mac reaches a certain temperature (obviously different for each line) in a certain component it falls asleep. In most cases this means the heat source is switched off such that the Mac stops getting hotter, eventually cooling down. The PMU or SMU (depending on your Mac) will not let you wake the machine again until it has fallen below a certain temperature threshold again. Therefore, unless you're in the very rare circumstance of having a Mac that continues to heat up through the sleep process (weird because only the RAM and parts of the logic board are powered), it won't shut down.