Now, I can't actually prove that Gen Urobuchi saw Serial Experiments Lain and used it as inspiration for some stuff that happens during the finale for Madoka.

But like, he certainly seems like the kind of guy who'd be into Lain.