VIRTUALLY EVERY WOMAN of child-bearing age has had that panicked moment: she gets her period unexpectedly in a public bathroom and doesn’t have menstrual products. For low-income women and girls who cannot consistently afford pads or tampons, the experience is more common.

The Massachusetts Senate on Thursday unanimously passed a bill requiring all shelters, schools, and jails to provide free menstrual products “in a convenient and non-stigmatizing manner.” The Department of Elementary and Secondary Education would estimate the cost to schools, and the Legislature would appropriate state money to pay for it.

Sen. Pat Jehlen, a Somerville Democrat, said on the Senate floor that she was inspired to introduce the bill after meeting girls at Somerville High School who were urging the school to put free menstrual products in bathrooms. “They said if their periods started unexpectedly during school they didn’t have time to rush to the nurse’s office, then the restroom, then the next class,” Jehlen said. “They said sometimes they miss class or school because they didn’t have products with them or at home.”

According to Jehlen, 17 percent of school nurses buy students pads or tampons with their own money. “We don’t expect school nurses to pay for toilet paper for everyone in the school,” Jehlen said. “Why should they pay for menstrual products?”

Sasha Goodfriend, executive director of Mass NOW, the state chapter of the National Organization for Women, said at least 11 states have passed laws making menstrual products free in schools, five states provide them free in jails, and only one state, Illinois, requires them  in shelters. If Massachusetts adopts the bill, she said, it would be the “most comprehensive menstrual equity bill in the country.”

Today, Goodfriend said, Massachusetts jails provide the products for free, though many corrections officers do not know that is the policy. Some schools – including those in Boston, Cambridge, Somerville, Fall River, and Medford – provide supplies, but many do not. Most homeless shelters do not provide menstrual products.

Goodfriend estimated that menstrual products can cost $12 or $13 for a one-month supply.

Leimary Llopiz, an advocacy assistant at the Southeastern YWCA, has been distributing free menstrual products to homeless shelters, schools, and community organizations around New Bedford. Last year, she got a donation of more than 4,000 products – and ran out within four months. “It’s nonstop. They ask me for it continuously,” Llopiz said.

Llopiz said she builds relationships with girls in single-father households, whose fathers do not know how to teach them about menstruation. She meets mothers who have gone without products – including a mother who placed socks in her underwear instead of pads – so they can afford to buy supplies for their daughters.

The Senate, which is led by female Senate President Karen Spilka, also Wednesday passed a bill requiring MassHealth to cover new mothers’ postpartum care for a year, up from 60 days. Sen. Joan Lovely, a Salem Democrat, said on the Senate floor that pregnant women enrolled in Medicaid, which covers low-income individuals, are more likely to have birthing complications than women with private insurance. Complications like postpartum depression can develop six months after a birth.

Health Care For All, a health care consumer advocacy organization, said pregnancy and childbirth-related deaths are a growing crisis across the US, and Black women are three times more likely to die of a childbirth-related cause than White women.

“Sixty days of coverage is not sufficient to address the medical and behavioral health needs of the postpartum period,” said Yaminah Romulus, policy manager at Health Care For All.

Both bills now go to the House.