Nadal's accomplishments are all the more remarkable compared to Sampras because it came in the era of Federer and Djokovic, 2 of the all time greats.
Sampras did not have multi slam winners to contend with. Agassi was not much of a competition at the majors and there was no genuine contender at USO and Wimbledon.
Sampras does not even have a final at French. So his number of weeks at number 1 over Nadal does not really carry that much weightage as opposed to Nadal who had made multiple finals in all 4 majors.