those recommendations do not make any logical sense to me either so i would suggest that you get a second opinion either from your own primary care doctor or the surgeon.
small non incarcerated hernia being told no sex for possibly 3 months or more. the linguinal hernia "fat into fat not thru wall" but is pressing against the nerve /artery leading into something called the proximal erectile process (i think. ). . the urgent care dr said no sex until after surgery. avoid erections. got worse and went to er next day same thing no sexual activity or orgasm of any kind until the consult erections may press on nerve. um not having sex or orgasm tends to lead to erections and 3-6 months without sex(or orgasm of any kind) seems like a long time.