Nadal and Sampras are both lucky they played in the perfect eras for their game styles and strengths. Nadal in the 90s would probably be a nothing on all surfaces but clay. Sampras today would probably only achieve any good results on Wimbledon and the U.S Open, and even there he would struggle much more with the slowed conditions of today vs his playing days. Both definitely were lucky to be born into the right era for how they play. Which is good as both were great to watch when they were on, and it was great for the game they played in a time period that allowed each of their skill sets to flourish.
It is just the other way around.
When Sampras was 14 years old, he was a baseliner. As Chang said, he already had a great and killer forehand at that age and he also had a great TWO-HANDED backhand. He was a great baseline player, Chang said.
But his coach made him change his backhand to a one-handed backhand and made him play a more aggresive style, made him come to the net and made him develope a great serve. His coach wanted him to win Wimbledon and the US OPEN one day, and he thought that those changes were needed because even though Pete was a great baseliner at 14, his coach thought those qualities would not be enough to win Wimbledon and the US OPEN one day.
So it was just the other way around. Had that coach not changed completely his game when Pete was around 14-15 and Sampras would have been a great baseline two-handed backhand player.
Of course nobody knows if he would have had the same success had that coach not changed his game. Maybe he wouldn't have won so many Wimbledons, US OPENs and WTFs, maybe he would have won more Australian Opens and maybe Roland Garros. It is impossible to know.
But he was not "lucky" that the conditions of his era were "perfect" for his game. It was his coach when Pete was around 14-15 who decided to change his baseline game and his great two-handed backhand because he thought it would be better for Pete in the long term. Was he right? We will never know.
The Nadal case is a bit different, because the slowing down of surfaces and balls have gone on gradually during his senior career, so he in fact is lucky because he didn't master slow court tennis thinking it would benefit him in the long term. He was just that good on slower courts since he was young (like most spaniards) and then the changes in speed of courts and balls benefited him a lot when he was already in his 20s (and still goes on).