For areas where your sewing machine can't go (should not be many, but especially if you are quite thin there can be *some*) hand-sewing is the other choice. Use a thimble, *sharp* heavyish needle, and I use handquilting thread (when repairing jeans).
The material around the hole has to be in good shape. If it's threadbare and thin, your repair will just rip out. Also if it's really stretched out, you will not get a flat patch to fit right unless it is pretty small.
If all else fails, and you just want them as housewear, good-quality duct tape actually works quite well. Put it on the inside *and* outside of the holey area; you can baste a narrow strip of t-shirt (rag) material around the edges on the inside of the garment if you find the duct tape tends to curl back and its adhesive sticks to your legs. IME this will go through the laundry a number of times before it starts to come apart, at which time a touchup with a warm iron (under a press cloth!!!) will give it a bit more lifespan.
Good luck, have fun,
Pat