You can easily clean any nooks and crannies of your earbuds and headphones with a Q-tip or cotton ball and rubbing alcohol.
Just dampen the Q-tip with rubbing alcohol and wipe the bud mesh to disinfect and remove any dirt or residue that remains. Make sure not to saturate the Q-tip with too much rubbing alcohol.