IIRC I was advised I didn't have to stop riding, but if I did, to just take it steady for about 2-3 weeks. But reality was a totally different matter. I couldn't get my leg over the frame, without a lot of pain (Ingroinal hernia), for a couple of weeks.
Best advice I can offer, is trying to avoid for the 10 days or so before the procedure, anyone who you suspect might have a cold. Coughing, blowing my nose and sneezing was, IME very painful, for the first week or so afterwards.
Edit - Re your family and cycling possibly being the cause, many footballers have hernia ops. But then again two colleagues at work also had them. One was very unfit and overweight. The other whilst not overweight probably the most vigorous exercise he got was walking to and from his car.