A 40-year-old woman died after being trapped underneath a wagon transporting hay that had overturned at a farm in West Townsend, police said. Police, fire, and rescue personnel responded to Brookside Farms at 3 Wheeler Road around 4:07 p.m. Friday, Townsend police said. Rescue crews extricated the unidentified woman, who was an employee of the farm, from under the overturned wagon, the statement said. She was taken to Nashoba Valley Medical Center in Ayer, where she was pronounced dead. The incident is being investigated by Townsend police, the Middlesex district attorney’s office, and investigators from the Occupational Safety and Health Administration.