When and why you have to start walking in the immediate postop recovery period is a concern I frequently see women "voicing" in the online forums. This tends to get short shrift in the pre-op teaching, other than a fleeting mention that you'll be up and walking "right away" after surgery.
Right away most likely means on the day of your surgery, a few hours after you get to your room from Recovery. Generally the order is written for you to "dangle" first and then, a few hours later, to get up and walk. This means that the first effort will simply be to sit on the edge of the bed with your feet hanging over the side. In itself, this is a minor production, and you'll have the help of your nurse getting all of your tubes (IV and catheter, at least) organized. Your nurse will show you how to use the bed controls to raise yourself, then swing your feet over and down from a sideways position so that you put less stress on your belly. This is a very effective and important technique that you'll be using in the weeks ahead, so take your time and use the help and coaching to get the hang of it. Your nurse should stay with you the whole time you're sitting up, since it may make you a bit woozy and light-headed.
Later, usually the evening of your surgery, you'll actually get out of bed and stand and walk a few steps. Sound scary? It's really not grim. You'll have your pain medication, and most nurses know to medicate you before you move around so you'll be prepared. You may want to hold a towel or small pillow to your belly to help with the sensation that it will fall out. This is an illusion from muscle weakness, but you'll feel more confident holding onto it. Standing up starts just like dangling, only you'll go all the way to standing up. Go ahead and stand up straight: there's nothing useful in walking hunched over and your back will appreciate the chance to stretch that good posture provides.
The first time you walk, you may only go a few steps across your room or down the hall. Each time you get up, it's a little easier to go a little further. By your next postop day, you may be ready to walk on your own, but do ask for someone to accompany you as long as you feel at all woozy.
So why is this so important? The most critical part of walking is that it helps to prevent the complications that can come from any surgery, and particularly abdominal surgery (and this applies to those whose surgeries used the vaginal route: the surgical site is in your abdomen, and that's what counts here). When our lungs are depressed from anesthesia and dried out from getting oxygen and we lie extra still in one position (as we do when under anesthesia and then later under pain meds), secretions can pool up in our lungs and make a perfect medium for bacterial growth. Pneumonias and loss of lung function can follow, so changing position, deep breathing and moving about are important measures to prevent this.
Another surgical complication is blood clots. These are caused by, again, lack of the normal movements that exercise our blood vessels and keep blood from pooling and clotting. Abdominal surgery makes us especially prone to blood clots, so your surgeon may order you to wear special elastic stockings or pneumatic leggings to help take over that blood vessel exercising when you're less active during the first operative day. As you move around more, the normal motions and muscular activity will resume this function. Still, it's important to move and stretch your legs every hour or so while you're in bed and to try to remember to never cross your legs or ankles while you're lying around (this constricts blood flow, too). The more often you walk, the more you're working to prevent blood pooling and the clots it can lead to.
Another big benefit to walking is the way it helps your guts to start working again. It's normal for abdominal surgery to cause our intestines to more or less shut down. They are cranky organs, and just don't like to be handled and disturbed. It may take a day or two for them to get over their snit. During that time, you'll find your doctor and nurses listening to your belly with a stethoscope and asking you if you've passed gas yet. Your diet will typically be very light at first, mostly clear things like jello and broth and fruit juices, so that you don't overload your nonfunctional guts. Walking will help stimulate your intestines to get back to work, and once they do so, it'll help keep things moving along. Many women find that the gas that builds up in non-functional guts is the greatest source of postop discomfort for them, and walking is the best way to keep it moving on its way. As you walk more and your guts work better, your appetite will recover and your diet will be advanced to more fulfilling foods. It's typical that you won't be discharged from the hospital till you pass gas, thus demonstrating returning bowel function. The more you walk, the sooner you'll be outta there, then. This is a worthy goal.
Once you're home, walking regularly will keep your guts moving despite the constipating influences of pain medications and inactivity. Walking is also the best, gentle exercise for rebuilding your stamina. The more you lie around and don't use your muscles, the weaker you get—strength is a real use it or lose it proposition. By walking regularly and for increasing duration and distance, we keep from losing ground and, safely, push ourselves to recover.
How much is enough? In the first week at home, just walking around the house to the bathroom and kitchen and sofa and bed will probably be enough. By the end of that week, though, you should be making brief forays outside--perhaps up the driveway or around the yard for a lap or two. By the end of the second week, women who have been hearty walkers before are doing blocks; those who may be in poor physical condition should still be able to walk a block or more at this point. So long as what you reach for is healthy fatigue, not exhaustion or extra soreness, you're on track for a healthy recovery. If you get sore or you don't feel refreshed after napping on your return, you need to back off a bit and give your body time to gather the additional resources to recover and be ready to progress again. For the first month, walking is your best exercise, and duration/distance, rather than speed or steepness of terrain, should be your goals.