During my last pregnancy, I ate an everything bagel (with poppy seeds) almost every day. At one of my checkups, my doctor’s office asked if I would perform a standard drug screen, and of course I said yes. Lo and behold, I got a call from my doctor’s office informing me I had tested positive for opiods. I was sure that they mixed up my results with someone else’s, because I hadn’t taken any medicine, let alone drugs, during my pregnancy. I was furious with them until my husband told me about the Seinfeld episode about a poppy seed muffin and a positive drug test. Is there actually any risk to eating poppy seeds during pregnancy?—A mama who loves everything bagels
To begin with the quick answer: at normal levels of consumption, poppy seeds are absolutely safe during pregnancy. As with many foods, if you consumed (say) a cup of poppy seeds every day, there might be concerns, but no one does that. And poppy seeds contain omega-3s, which are thought to have some benefits to brain development. Overall, poppy seeds are fine.
The main risk is the one you cite, the positive drug tests.
The relationship between poppy seed consumption and positive drug tests has been known for a long time. It’s a complication in military drug testing, in drug screening programs, and, more recently, in pregnancy, where pre-delivery drug testing has become more common. There are reasons to test pregnant people for opioid use — opioid use disorder has, unfortunately, become much more widespread, and knowing that an infant has been exposed to opioids impacts their early care. But poppy-seed-based false positives are very possible, especially with low testing thresholds.
In some cases (as, it sounds like, yours), the mistake is recognized quickly and without many consequences, but there are cases in which women were separated from their newborns after this type of testing. Follow-up testing can generally distinguish poppy seeds from other opiates, but obviously there may be damage done in the short term, and there is no way for screening tests to avoid this.
It is a tricky problem. Most concretely, though: poppy seeds pass through the system quickly. So avoiding eating poppy seed products within a few days of a drug screen should be enough.