Unfortunately I can't say much about the MPAA, but for the ESRB:
Video games with questionable content were nothing new in the 90's - at least as far back as the mid 70's, there existed games with incredibly adult themes (The most famous and well-known example of which is Custer's Revenge, in which you rape a Native American woman), but they were often kept under the counter at stores or sold solely in adult film stores. When Nintendo revived the industry in the mid 80's following the US crash, they instituted pretty strict standards towards publishers, censoring almost anything questionable (for example, basic religious symbols). Being the industry leader at the time, they pretty much assured that video games in the US were squeaky clean.
While all of this was happening in the 80's, though, the music industry was in its' own debacle with the government, debating regulation and ease of access to impressionable children. This would eventually lead to the creation of the Parental Advisory sticker. At the time, due to the state of the industry, nobody thought it was particularly necessary to do the same for video games.
Fast forward a few years to 1992. Senators Joe Lieberman and Herb Kohl began bringing what they saw as "corruption of society" through video games to a mainstream view, with multiple hearings over the course of the next two years citing multiple video games. The main offenders, though, were Mortal Kombat - which, in its' arcade form, had all of the bloody fatalities intact sans cheat codes or modification - and Night Trap, an "interactive" movie game for Sega CD with plenty of blatant sexual innuendo. By now, Sega had eaten a considerable portion of Nintendo's market share with the Sega Genesis. Being Nintendo's main competitor, it should surprise no one that Sega had completely different views on questionable content and ratings: whereas Nintendo's executive vice president, Howard Lincoln, argued that Night Trap shouldn't have ever even existed, Sega argued that these games were made, marketed to, and intended solely for adults, even using their own self-imposed ratings system to rate both Night Trap and the Genesis port of Mortal Kombat as mature games. Other companies such as 3DO had their own unique systems, but Lieberman argued that they were insufficient and that there needed to exist a federal ratings committee. Under fear of federal regulation, Sega, Nintendo, and several big time game publishers/developers set to create their own system.
Sega originally proposed using their already in place system, but Nintendo, weary of giving ground to their competitor, argued for a more neutral system, leading to the creation of the Interactive Digital Software Association in mid 94', and culminating with the current ESRB system in late July of the same year.