The science is unclear:
People who use illicit drugs often have been shown to have higher rates of both extroversion and susceptibility to boredom, which may drive them into more situations where drugs appear, or simply make them more likely to crave new subjective experiences. And those who are particularly susceptible to boredom have been shown to use opiates more often. But this is where the studies break down.
Most research on the topic of how personality relates to drugs of choice is conducted among people who already have drugs of choice—addicts. And as any addict knows, once you’ve taken a shine to a drug, it can be exceedingly difficult to disentangle the personality factors that came before from the ones that came after. By the time the personality questionnaires are administered, who’s to say what caused the drug use and what the drug use caused?