There was an interesting study on jazz musicians:
A pair of Johns Hopkins and government scientists have discovered that when jazz musicians improvise, their brains turn off areas linked to self-censoring and inhibition, and turn on those that let self-expression flow. The joint research, using functional magnetic resonance imaging, or fMRI, and musician volunteers from the Johns Hopkins University’s Peabody Institute, sheds light on the creative improvisation that artists and non-artists use in everyday life, the investigators say. It appears, they conclude, that jazz musicians create their unique improvised riffs by turning off inhibition and turning up creativity.
And because cannabis use is so so common amongst jazz musicians and has been since even the 1920s, perhaps cannabis enhances creativity via a similar mechanism? Who knows...