This is a very timely subject to revisit, given that global weather shifts are stressing traditional coffee farms, and recent supply chain issues are likely to increase the price and reduce availability of coffee for a lot of people. We've seen this coming for a while, and have been looking into a number of alternatives.
As noted above, cleavers (Galium aparine) is the popular go-to alternative, at least for discussion, and we actually enjoy steeping the plant as an early spring green tea. But it will be a challenge for our small garden to grow enough of them to make roasting the tiny seeds a viable option. Fortunately we have LOTS of herbal options for hot morning beverages. Our wild blackberries give us leaves all year long, and we have hibiscus, mulberry, curly dock and pine for flavorful alternatives. Spring greens (chickweed, speedwell, purple dead nettle, etc.) are also nice options.
We've solved the caffeine by planting yaupon holly, widely advertised as the 'only native North American caffeinated plant'. (Apparently the caffeine content of cleavers is negligible by comparison.)
Roasted coffee substitutes besides cleavers include dark-roasted peanuts, pecans, and dandelion or native desert chicory roots. If things get bad enough, we may even give roasted acorns, hackberry seeds, or mushrooms a try.