As befitting the complex politics of Nicaragua and Central America in general, the answer to this question is "yes and no." The Sandinistas were indeed successful in overthrowing the Somoza dictatorship in 1979. Under the leadership of Daniel Ortega, this leftist coalition won control of Nicaragua, and sustained it through several elections, despite an almost constant struggle against the so-called "contras" who opposed Ortega's regime with heavy U.S. backing from the Reagan Administration.
However, in 1990, the Sandinistas were defeated in a general election, one which saw much American involvement, including CIA operations. While it is too much to say that the United States "defeated" or "overthrew" the Sandinistas, it is fair to conclude that American support for the Contras contributed to the internecine fighting that cost thousands of lives, ruined the Nicaraguan economy, and perhaps most important, gutted the social programs implemented by the Sandinistas. In the wake of the 1990 elections, a coalition led by Violeta de Chamorro gained control of the nation, promising peace and more economic stability. However, Sandinistas remained (and indeed remain) one of the major political parties in the nation, with a significant presence in the legislature and in local governments. Indeed, Daniel Ortega was reelected, albeit with a far less ambitious agenda than in the 1980s, in 2006 and in 2011. He remains president today.