Same for me (1 year old 27" iMac). Never done this before & has been randomly shutting down for weeks now. It started out very bad - every few minutes in the days immediately after I installed Lion, now it's about 1-2 times per day (or less). I also have a Macbook Pro that has no problems at all.
I have spent hours on the phone with Apple - tried every test & nothing has solved the issue.
They suggested it could be old incompatible software, so I have basically stripped my mac of any software I no longer use (and now there is nothing on the iMac that isn't in the laptop). I used Appcleaner to make sure all component parts of old software was removed.
I also use Cocktail to complete a complete system maintence daily (repair permissions + clean out caches etc).
Between those two actions, the computer is at least usable now, but its certainly not fixed.