I also have the screen rotation problem. ICS is supposed to be released this month, hope it fixes the problem. If not, someone mentioned launcher seemed to resolve the problem for them.
The screen rotation has been alright for me, save a couple random times recently. Like stated above, I just turn the phone off real quick and problem solved.
First one had the problem and even a hard reset to factory default didn't solve the problem. I got a new replacement and that worked until about less than a week new, it happened but this time a soft reset fixed it. It hasn't happened since (knock on wood!). I'm probably about 2 weeks since the soft reset that fixed it.