Most often cranberries are associated with Sphagnum and inhabit open bogs.