For THC, it triggers the same areas of your body that get triggered when you’re hungry. So, your body thinks it’s hungry without the usual trigger, so you are willing to eat more despite not actually needing food.
This might work slightly differently per medication, but it’s the same principle for most of them.
Latest Answers