Legal weed is apparently prompting an epidemic of the munchies in states that sell recreational cannabis, with stoners there gobbling up more candy and snacks than people who live where it remains against the law.

Recent Nielsen data revealed that sales of salty and sweet snacks jumped over the year ending on April 27, with sales of both candy and snacks rising faster in states where cannabis is legal.

The “candy and snack growth rate” showed that candy sales grew by 2 percent in states with legal weed compared to 1.3 percent in states where it remained illegal.

And snack sales grew 7.2 percent in states where pot has been legalized, compared to 6 percent in non-stoner states.

Overall, salty snacks had sales of $29.9 billion and sweet snacks had sales of $6.5 billion, Axios reported.

Marijuana is legal for recreational use in 11 states and Washington DC, and a number of others, including New York, Connecticut and New Jersey, have also considered legalization.

Nielsen said that “munchies” — the cravings potheads have for tasty food after getting stoned — are creating “big opportunities for the American food and beverage market, particularly for the snack and confectionery category.”

“The increase in sales starts at the time of the legislation becomes effective,” the Nielsen report said.