Each surgery and each individual is different, and the surgeon should give you guidance on the length of time opioids will be required in the post-operative period. The length of time varies depending on the type of surgery and individual pain levels. Often, non-opioid pain medicine will be needed for longer periods of time after the opioid prescription runs out.