Residents in Kemble said they heard "explosions" and one woman said her home shook with the force of the noise.
Witnesses said they believed the noises after 22:00 GMT on Tuesday were linked to the nearby Cotswold Airport.
Gloucestershire Police have apologised for the disturbance.
The booms, heard from Kington St Michael to Malmesbury and Calne in Wiltshire. sparked calls to BBC Wiltshire and BBC Radio Gloucestershire as well as dozens of posts on social media.
Writing on Facebook. Sophie Wyatt described "a massive bang and a flash" as she was out near Kemble.
She said she saw "a crowd of people hanging around a lit-up aircraft further into the airbase".
Nick Howard, Cotswold Airport manager, said the booms were part of "a high level and very rare police and emergency services exercise".
He said he would not comment further "due to the nature of the exercise".
Paul Shanley, 51, who lives just outside Kemble village described the booms as "very disturbing - worrying".
"There was an enormous explosion - really deep explosion - it was enough to wake up my daughter," he said.
Mr Shanley, who lives just outside Kemble, said his family had heard similar booms "three times before this but we've never got to the bottom of what it was".
He said when he went outside to look there was "a lot of action going on over at the airfield" but when he rang police asking what was happening he was told "they weren't allowed to talk about it".
Angie Abingdon posted on Facebook: "Our house shook! There were concerned people standing outside after the first. I think we should have been given some warning."
A spokesperson for Gloucestershire Police said: "We would like to reassure residents that the explosion heard in Kemble yesterday was part of routine operational training for police.
"We apologise for the disturbance caused."

The four crew members of the Be Good Too were rescued by the US Coastguard 300 miles (482.8km) off the coast of Virginia on 14 January 2014.
The boat came ashore on the west side of South Uist on Monday.
The crew of Be Good Too encountered stormy weather three days after leaving a marina in Jersey City.
The catamaran was sailing for Caribbean.
They were airlifted to safety by a coastguard helicopter.
South Uist-based photographer JF Martin found the wreck on the beach.
Former crew member, sailor Charles Doane, has blogged that he "couldn't believe it at first" when he was told the boat had been found.
He said the owner of Be Good Too had died in past three years.

The Tees Valley Airshow will take place on 29 August at Durham Tees Valley Airport for the first time since 1989.
Organisers said the it had been "prepared in full compliance" with Civil Aviation Authority requirements.
At least 11 people are thought to have died after a Hawker Hunter jet crashed on to the A27 during an aerial display at Shoreham on Saturday.
A statement from Tees Valley Airport said: "Everyone connected with the airport and the air show is obviously deeply saddened by the weekend's tragic events at Shoreham and expresses their condolences to the victims' families and friends.
"Incidents of this kind are thankfully very rare and safety is, of course, always our primary objective.
"All our procedures have been developed with and approved by the Civil Aviation Authority.
"In addition, all plans for the air show have been prepared in consultation and agreement with the local authorities."
All aircraft operators taking part in live displays have been required to produce confirmation relating to pilot qualifications, aircraft airworthiness and insurance as required by the CAA, organisers added.
Late-night loud booms in parts of the Cotswolds which sparked complaints on social media were apparently down to "a high level and very rare police and emergency services exercise".
[NEXT_CONCEPT]
The barnacle-covered wreck of a catamaran abandoned during a rescue off the US east coast three years ago has been found on a Hebridean beach.
[NEXT_CONCEPT]
A minute's silence will be held at a North East air show in memory of victims of the Shoreham crash.