Orbits are funny things really The key thing is the distance from the object that they are orbiting, and the speed at which they are going.
Spacecraft routinely speed up/ slow down their orbital speed, to affect where they are orbiting around a particular spacecraft.
So, the real answer is, Neptune pulls Uranus closer when it is ahead of it in orbit, and slows it down when it is behind it in orbit. The net effect is to almost cancel each other out. But you are right, over a very long period of time, it can have an affect. The same is true of all planets, they affect each other over a long period of time. It actually was part of the irregularity discussed previously (See the article The Discovery of the Outer Planets).
First, Mercury "aligns" with the ecliptic plane only twice in its "year", when it comes from above to below and vice versa.
Luckily for our calculations, Pluto is not a planet any longer, because it would completely rain on our parade with its 248 Earth years of orbital period and another two points within it that it crosses the plane again. Getting Pluto and Mercury aligned alone would take millennia.
Now, what do we count as "aligned"? This is a very vague term because it doesn't state any tolerances. If you mean discs of the planets overlapping, just forget it, their own minor deviations from the ecliptic plane will suffice that it will never ever happen. Let us assume a tolerance of one earth day of their movement. This is fairly generous, in case of Mercury it's over 4% tolerance of its total orbit radius, which considering their size on the sky is quite a lot - in case of all planets the distance traveled over one earth day far exceeds their diameter. So, we're not taking a total alignment, just one night where they are closest to each other, a pretty loose approximation.
Now, we pick the day the rest of the planets are on the plane as Mercury, so let us simply take the 2 in 88 days of its orbital period and continue dividing by orbital periods of other planets.
1 in (44 * 225 * 365 * 687 * 4332 * 10759 * 30799 * 60190) days.
That is one day in $5.8 \cdot10^{23}$ years.
The age of the universe is $1.375 \cdot 10^{10}$ years.
It means planets would align for one day in 42 trillion times the age of the universe.
I think it's a good enough approximation to say it is not possible, period.
Feel free to divide by 365, if you don't want aligned with the Sun but only with Earth. (one constraint removed.) It really doesn't change the conclusion.
Best Answer
How long time does it take before three planets achieve the same relative position?
The answer is never, except for the case when their orbital periods can be expressed with low integers, like the 4:2:1 resonance of Io, Europa and Ganymede
However, what you are asking about is when they are going to be in almost the same position again, a quazi-period.
To find those periods, we are pretty much only left by brute forcing as our method. A nice little detail about the case with three planets is that the inner planet is always aligned with one of the other ones at the closest three-planet alignments. That allows us to calculate accurate solutions. In the cases of four or even five planets I simply give up.
To check all the possibilities, we can use a program. Here is an example of a function in JavaScript returning a list of quazi-periods and alignment error:
For Jupiter, Saturn and Uranus, I get the following output:
Time,,,error
13.81170069444156,,,0.30449020900657225
39.71676854387252,,,0.12441143762575813
41.43510208332468,,,0.08652937298028318
139.00868990355383,,,0.06455996830984656
138.1170069444156,,,0.04490209006572288
179.55210902774027,,,0.041627282914560304
317.6691159721559,,,0.0032748071511630172
3991.581500693611,,,0.002329597100612091
4309.250616665767,,,0.0009452100505313865
The first of this periods is of no use, as the error in alignment is almost a third of an orbit. Note that the one you found (that is really impressive you did,actually) gives an error in the alignment of less than a percent. We have to look at periods more than a thousand years long to find any better alignment.
Be sure to feed this function with accurate orbital periods.