Stearns, a former player at the University of Texas, turned professional in June last year.
Ostapenko won the 2017 French Open but has since failed to advance past the third round. The 17th-seeded Latvian dropped her serve five times against Stearns and hit 28 unforced errors in a 6-3, 1-6, 6-2 loss.
The 21-year-old Stearns has been climbing the WTA rankings and entered the French Open at No. 69 on the back of an encouraging clay-court campaign.