I have hypothesized that immigration may have an effect on median income -- not because it is bad for the economy per se but just form the fact of adding millions of new people in the bottom quartiles would tend to shift the median downwards (just the pure math of the thing).
I have only given them a quick glance at this point, but Tyler Cowen links several studies that tend to say my hypothesis is false.
Also, here is an interesting discussion about the median income stagnation hypothesis itself and how sensitive it is to the end point, pointing out in particular that most folks start their analysis from a point within Nixon's wage and price controls, which skew the data - shifting the start point forward even a couple of years makes most of the stagnation go away. He builds on a post by Brink Lindsey showing historic median income growth over a longer time frame, implying the aberration may have been the boom of the 1950s and 1960s rather than the lower growth rates of today.
I would normally find this a fascinating debate if it weren't for the dark cloud behind it that half the folks arguing the point wish to use it as a justification for further reductions in economic liberties.