Yes a hernia can interfere with sexual function but not directly. A hernia will cause pain or other discomfort which will discourage sexual function. There is no interference with actual physiology. Hernia surgery also does the same thing. When you are healed and the discomfort is gone everything will be back to normal.