I believe it originally used as an agricultural term - "Bumper Crop" doing a search on that, I found this: "bumper in the 17th century was a large glass of beer or wine that was filled to the brim, hence the sense of bumper as large"
A ' bumper ' was a large drinking vessel and is mentioned in many of Sir Walter Scott's Waverley novels. Presumably it has became synonymous with anything of generous proportions.