Announced attendance was 5,248, BYU's largest home crowd since 2007.
Sander led BYU with 18 kills, seven digs and five blocks, and Carson Heninger added 12 kills.
"That was a really fun match," Sander told BYUtv. "So many guys stepped up, and that was huge for us."
In the decisive third set, redshirt freshman Joseph Grosh broke a 23-23 tie with a kill, and then Sander served an ace for the win, his serve trickling over the net after hitting the tape.
The Cougars are now 45-6 at home the past 31/2 seasons, with two of those losses at the hands of Stanford. But the Cougars had too much firepower on this night for the Cardinal, which was ranked No. 1 last week before a pair of losses.
BYU hosts Pacific on Saturday night in Provo (7 p.m. MST, BYUtv).
No. 7 BYU 3, No. 6 Stanford 1
O Senior Taylor Sander registers 18 kills, 7 digs and 5 blocks to lead the Cougars.