Your question contains a number of errors and misconceptions.
Firstly the maximum output of a successive approximation ADC (here 0x3ff) corresponds to Vref - 1 LSB
The voltage will thus be
sensorValue*5000.0/1024. Note this error is less than the error of ±2LSB.
Measuring your 5V is futile, as this is the default analog reference, so the result must be 0x3ff.
Measuring the 3.3V pin will give a relative value to the 5V reference. Both are produced from commercial grade regulators with a accuracy of ±5%.
You are also confusing the precision of the reading (10 bit) with accuracy which is a best ±5% ±2LSB.
If you really want to measure voltage you should use the internal 1.1V bandgap reference. You would of course need to reduce the 5V and 3.3V to less than 1.1V. This introduces another potential error (even if you use 1% resistors), but would give more accurate results which are directly comparable.