It's called self medicating. Lots of addicts do it with nicotine also.
“Opiates are the religion of the masses” Neil Gaimon