I was given meds while in the hospital. I took them the first day then stopped taking them. My son was groggy and would fall asleep while nursing. Long term, no issues but it did make starting to breastfeed hard.
If I had another c section I think I'd try to avoid them but that's also a personal choice because of how opoids affect me cognitively, I just can't think clearly (this happened after other surgeries too).