With the score tied 4-4, Bernadina led off the 11th with a single off Wilton Lopez (3-1), bringing Kurt Suzuki to plate.
The Nationals catcher hit a nubber to the right of the mound that both Lopez and first baseman Steve Pearce tried to field. The pair collided as third baseman Matt Downs came charging into the scrum.
Pearce eventually picked it up and fired it to first but the ball sailed down the right field line as Bernadina headed for third. Astros right fielder Brian Bogusevic picked it up but threw wildly to home, allowing Bernadina to score the decisive run.
The strange play made a winner of Craig Stammen (5-1), who tossed two scoreless innings.
Ryan Zimmerman went 2-for-4 with a two-run single for the National League East-leading Nationals.
Houston forced extra innings when Jose Altuve socked a run-scoring double with two outs in the bottom of the ninth.
Marwin Gonzalez homered for the Astros, who dropped the first of a four-game series.