what youll generally find if your missing leg stumps balls on a consisten basis is either one or both of a couple things.
Firstly, your balance whilst trying to play these balls is flawed. You head is most likely not still, and falling to the off side, causing the weight of your body to be shifting to the off side.
Try and keep you head still at point of impact, with your head straight and not falling to the side. The correct feeling should be eyes and nose over the top of the ball.
Secondly, it could also be possible that you are playing around your front pad. This is noticeable when the ball if angling down the leg side yet your front foot still points in the direction of extra cover/wide mid off. Ideally your foot should be pointing straight down the wicket or slightly to the leg side, opening you body up slightly, allowing for a straight and natural downwards arc of your bat, thus meeting the ball with a full face rather than playing across the line of the ball.
Correcting this might take some time but there are a couple drills one could use to rectify this. The use of cones is very handy. Place a cones at half volley length on our just outside legs stump, practice getting your full close to the ball with your front toe opened up as mentioned above, and then play the ball in the direction of straightish to wideish mid on.
One you are comfortable with this you can then progress to having someone underarm you balls from 2-3 metres away bouncing once or even twice, on the same line, following the same method as the cone drill.
20-25 of these underarms correctly played per session should see you rectify your error.