Technology is increasingly a part of the classroom experience. In 2008, the ratio of students to Internet-connected classroom computers was nearly 3 to 1, down from almost 7 to 1 in 2000, reports the National Center for Education Statistics.
While many schools have banned use of personal gadgets in class, others now encourage it for note-taking, research and in-class assignments. About 44 percent of elementary, middle and high school students have done school work on a smartphone, according to a 2013 survey from education company Pearson. Ads may pop up in the course of those classroom Web activities, or during the social media checking and Web browsing done between classes and during lunch.
Food companies are also spending more of their marketing budgets on digital promotions, versus television ads and in-school marketing. A 2012 Federal Trade Commission study found that in 2007, food companies' overall spending on marketing to people ages 2-17 fell 19 percent from the previous year, to $1.79 billion. But over that same period, they spent 50 percent more on online, mobile and viral marketing promotions targeting that age group.
"Our research suggests certainly that digital marketing is where the big increases are," Schwartz said.
(Read more: Six college courses that help grads land jobs)
Although the Children's Online Privacy Protection Act prevents companies from collecting personal information and restricts marketing to kids under 13, many promotions are hard for children to identify as ads, said Miro Copic, a marketing lecturer at San Diego State University. There's often a game component, or focus more on brand interaction, like voting for a new flavor.
And experts say there's little chance that food companies will nix kid-focused marketing entirely. "With snack foods, you absolutely have to get them early," Copic said. "Consumption peaks in snack foods when you're about 24. Then it starts to decline."
—By CNBC's Kelli B. Grant. Follow her on Twitter @Kelligrant and on Google.