The MPU-6050 fairly reliably does what it is intended to do, which is to report rotation rates and accelerations.
Your problem is the choice of measurement technique, and how to discriminate "standing up" motions from other possible motions. With the MPU-6050, that seems to be a very difficult problem. A different approach might make this much easier.