Share your experience!
I've had my Xperia M for about 3 days, and the power button stopped working last night, I haven't knocked it, dropped it or damaged it in anyway, it spent the night in my pocket at work, so the power button (which is stands REDICULOUSLY proud of the phone case in my opinion) might have been pressed a number of times but I fail to see why that should be a problem, given as, you know, I do need to turn the display on from time to time to actually use the phone 
I know the phone is on, I can recieve messages (it makes the noise saying it has a message and flashes a light) but I can't get the display to turn on.
I've tried pressing and holding the power button, I've tried pressing and holding the power button with the case off. Niether did anything, briefly last night I could make the screen turn on by pressing the camera button. I've even restored it to factory data settings, no joy.
Similarly, if the screen is on (I can get it to turn on by taking the battery out and putting it back in) I can't lock the screen using the power button OR turn it off for that matter.
I get the feeling this is hardware related but if anyone could give me any ideas on what to do that would be amazing.
Or should I just take it to get it looked at?
Did your pocket get wet, while working ? try to dry the area arround...
Also do a service menu test so you can get a better result... Dial *#*#7378423#*#* ( Do necessery tests...)
If you found anything abnormal You should take your phone to Sony Servie Centre...
Nope, it didn't get wet, the only thing I can think of that might of happened to it, is the button may have been pressed a lot as I was walking around alot.
Doesn't appear to be any relevant test in that menu I get after dialing that so, not sure what to do from there.
When you enter service menu, there is service test click on that and do test for keys and buttons 
Sadly the ON/OFF key is not part of the Service Test...
it seems to be a hardware problem... if it still under warranty I would use it...
Diagnostics a Sony App has the various tests. But if you cant power on or off your fone it would most most and most probably be a hardware issue. Do use your Sony Warranty.