Yes, there have been several instances in U.S. history where a president began with a unified government (control of the White House, House, and Senate) but lost majorities in both chambers of Congress during the following midterm election.
Modern Examples (Post-WWII)
In recent decades, this "double loss" has happened to four different presidents:
(1994): Clinton began his first term with Democratic majorities in both chambers. In the 1994 "Republican Revolution," his party lost control of both the House and the Senate.
(1946): Following the end of WWII, Democrats lost their 14-year-long hold on both the House and Senate to Republicans during Truman's first midterm.
Historical Trends
While losing seats in the House is extremely common for the president's party—occurring in 18 of the last 20 midterms since 1946—losing control of both chambers in a single midterm is rarer.
The "Six-Year Itch": Presidents are statistically more likely to suffer heavy losses during their second midterm election (year 6 of their presidency).
Recent Wave Elections: In some cases, a president may lose only one chamber initially. For example,