edit: looks like someone already checked realoem.com for the part nbrs
Its easy to find out...just go to realoem.com and look up the part nbr for the X5 racks...then run a part nbr search. If the e39 & X5 racks are interchangeable...then they will be listed together under the same BMW 11 digit part nbr.
If they have specific (different) part nbrs for each model...then there is something slightly different that requires that they each have their own part nbr...and more than likely it is the width as
upallnight mentions.
I do happen to have the dimensions of the e39 & e53...and this is probably why the cross bars aren't swappable between the e39 & e53: