Same thing just happened to me
I just went on a web site and the login bit was a bit messed up and then it started shaking and freaking out but it was shaking left and right not up and down, i pressed the home button but the screen went black, im not sure if the little loading circle (like when you switch it off) came on cuz tbh i was freaking out about it having a spaz attack :L so i pressed the lock button and pressed it again and it carried on shaking on the lock screen and then i unlocked it and it was fine 🙂 dunno if i'm relived or worried that this has happened to somebody else :/
Has it happened again? I have a 16gb black 4s btw