BOSTON — As with many start-ups, the idea was born from trivia that suddenly did not seem so useless — the statistics of professional athletes.

Even in his youth, Jason Robins was in touch with his inner Billy Beane, drafting and trading baseball players in fantasy sports leagues. He was a marketing professional at Vistaprint when he and two colleagues, who also had teams in numerous fantasy leagues, discovered an underdeveloped niche: daily fantasy sports websites, which let players put their Moneyball skills — and cash — up against others’ while compressing the grind of a season into a single day.

Robins, 33, and his colleagues, Matthew Kalish, 32, and Paul Liberman, 31, started their own site, DraftKings.com, in April 2012. They knew they could attract players, with each day offering an opportunity to build a new roster and to cash in. The surprise has been that professional leagues — traditionally ferocious opponents of gambling on their sports, online or off — have quietly embraced gambling on fantasy sports, apparently aware that the passion for it is crucial to their bottom lines.

Major League Baseball especially has taken daily fantasy sports under its wing. It has a partnership with DraftKings, which offers a daily contest on MLB.com in which prizes include tickets to games rather than cash.