There are several stories about the invention of coffee! Many people credit the goat herder Kaldi, on the Ethiopian plateau, with discovering that goats who ate berries from a certain tree became so animated and energetic they wouldn’t sleep at night. He told the abbot at a monastery, who found that a drink from the berries helped him stay awake through evening prayer, and the rest is history.
Another story credits Moroccan Sufi Sheikh al-Shadhili, who noticed that birds were energetic after eating these berries and tried it himself.
There are several other stories, all in the same region, of people discovering animals eating the berries and becoming very energetic. The people tried it for themselves, and the drink spread.