It is much easier to move side to side on the court than up and back. Try to watch the ball coming off the racquet and the height over the net.
If it comes off the racquet low with the face flat, immediately take a step or two forward even if it looks like the ball may go in the net. If the racquet face is open and the ball is high, take a step or two back and be ready to move even further in that direction.
Getting your feet moving early is the key to getting in the right position. It is not how fast you run in this situation, it is how early you start your movement.
Practice picking up the trajectory of the ball early and you will start feeling much better about your hitting position on the very high or very low balls.