The team came from behind to defeat Iceland 2-1 in their playoff final in neutral Poland on Tuesday
Zinedine Zidane left out Cristiano Ronaldo and Gareth Bale in a largely second-string Real side but not even the injection of youth could breathe life into his team until Asensio's late goal ended a run of three games without a win.
Real struggled against a weakened Leganes team showing eight changes from the 3-2 La Liga defeat by Real Betis on Monday, indicating the host' lack of enthusiasm for the Cup despite supporters packing out their Butarque stadium.
The second leg at the Santiago Bernabeu is on Jan 24.