Unfortunately, there is not much that can be done to speed up recovering from any kind of surgery. Your body simply needs to heal itself, and trying to do things too quickly can be counter-productive and end up extending recovery time. Hopefully your doctor will give you some advice on what you should do in the days and weeks following your surgery to make recovery as painless and quick as possible.
You do not mention what kind of hernia surgery you are having, but most people who have laparoscopic hernia repair surgery are able to go home the same day as the operation. Recovery time is usually about 1 to 2 weeks and the healing process is really only due to the level of post-operative discomfort. It often necessitates a mild painkiller and some rest for a few days, but that is about it. Some studies have suggested that there is less pain after laparoscopic hernia repair than after open hernia surgery, which is the other kind of operation you might be having. In open surgery there is generally a longer recovery period, usually lasting from 4-6 weeks, as this is how long as it takes for the stitched tissue to heal together. Premature physical activities and straining before the healing process is complete can lead to disruption of the stitches and recurrence of the hernia.
Regardless of which type of surgery you have, it is important for you to follow your doctor's advice on what you can do to ensure the best and quickest recovery that you can. Since he or she knows you and your individual situation, he or she is best able to determine what measures you should be taking in the weeks following your operation to get back on your feet as fast as possible. Good luck with the surgery!