An early favourite with bookmakers, the band's album beat rapper Plan B, The Maccabees, Richard Hawley, Django Django, Jessie Ware and Field Music.
BBC Sound of 2012 winner Michael Kiwanuka, Ben Howard, Lianne La Havas, Roller Trio and Sam Lee also lost out.
Alt-J thanked their parents for helping them to win the Â£20,000 prize.
"We might just thank everyone in team Alt-J who has ever made a difference to us. And our parents... thanks for not making us get jobs!" said the band as they accepted their award.
The four-piece, who met at university in Leeds in 2007 but are now based in Cambridge, said the award would probably give them "a level of security".
"The Mercury Awards puts us in the hall of fame for sure, because it's such a well respected award," said frontman Joe Newman backstage.
Alt-J also rubbished the idea of the so-called 'Mercury curse', a term coined after previous winners such as Speech Debelle failed to live up to the hype.
"This kind of curse isn't dependent on whether you win the Mercury. It's dependent on the material that you have after you win the Mercury," said Newman.
"We feel as a group we have a real strong set of songs, future songs. It's about the artist."
The band revealed they would be celebrating by getting drunk.
However they did add they would spend some of the prize money taking their parents out for a slap-up meal, after their families had watched the awards on TV while hosting their own Mercury-themed parties.
Each of the 12 nominated acts performed live at this year's ceremony, in its new home, the Roundhouse in north London.
Plan B, real name Ben Drew, opened the show with the title track from his nominated album Ill Manors, which is the soundtrack to the film he wrote, directed and starred in.
He performed from the top of a new-look double-decker stage in the Camden venue, the same spot where The Maccabees later brought the show to a close with a high energy rendition of Pelican.
BBC 6 Music presenter Lauren Laverne replaced longtime host Jools Holland as coverage of the event moved from BBC Two to Channel 4.
Radio 1's new Breakfast Show host Nick Grimshaw fronted the backstage coverage.
Other standout performances came from La Havas, who silenced the room, and Ware who like many of the nominees said they were happy just to be nominated.
Most have already enjoyed a sales boost while the act behind this year's 'token jazz album', Roller Trio, said they received a host of new bookings and got a new agent the day after being nominated.
HMV's Gennaro Castaldo predicted Alt-J's win could result in a "five or sixfold" increase in sales.
Last week, fellow nominees Django Django, who met at art college in Edinburgh, won Q magazine's best new act award.
However they admitted they were a little nervous as the Mercury's evening kicked off.
"It feels a bit like we're all about to get married. To each other," said Django drummer and producer Dave Maclean.
He had designed the band's matching shirts especially for the event, but afterwards insisted there were no hard feelings and they were glad Alt-J had won as it was "a good album".
Last year PJ Harvey became the first act to win the Mercury Prize twice, when her album Let England Shake took the prize.
This year bookmakers William Hill had reported a late surge of betting for Sheffield troubadour Hawley, who received his second nomination for Standing at the Sky's Edge.
He said the Mercury Prize, which has faced criticism for becoming too predictable, was "massively important" as it celebrated the album as "an art form".
"It's a thing in culture that we're losing," he explained on the red carpet, likening buying MP3s to "buying a bucket of steam".
"An album is a sequential series of musical events that elicits an emotional response - all you need to do is give it your time."
Hawley continued: "I'm the oldest guy nominated here and I like the album as something that you engage with, it gives you so much.
"Our relationship with music has changed so massively in such a short space of time. Music is something we need, it's not a luxury."
Recent figures from Music Week show that sales of artist albums are down by 15.3% year on year, while single sales are rising.
However this year's winners Alt-J are also proud to call their debut record "an album-y album", designed to be listened to in its entirety.
"That's why we were so happy to be nominated for the Mercury, because we're album people I think," said the band's keyboard player Gus Unger-Hamilton.
"I'm not saying we made the album thinking, 'this is going to win a mercury', but just 'I hope people appreciate this as a single body of work'."
However, as An Awesome Wave was five years in the making, fans may have to wait a while for the follow up.
"We didn't rush anything, we were patient and we took our time," explained Newman.
"That's certainly something that we're going to consider for our second album. You can't rush creativity, and you can't rush working with a group of guys."
Indie rock band Alt-J have been named winners of this year's prestigious Barclaycard Mercury Prize, with their debut album An Awesome Wave.