The term "self medicating" doesn't imply that it works, just that they're trying to address an underlying issue that isn't being sufficiently addressed by anything else. It's closer in concept to "coping mechanism" than it is to "prescribed medication".