The splanchnic nerves, which are part of the parasympathetic nervous system, innervate the pelvic and genital organs, regulating the emptying of the urinary bladder and the rectum as well as sexual functions like erection and orgasm.