Ugh I’m sorry, that stinks! This is eerily reminiscient of what happened to me a couple of years ago, except the flooding was through the floor (I was in the basement). My mattress was on the floor, and I noticed that the side of the bed was wet. That was when I discovered that the entire back corner of my room was soaking wet – from the carpet to anything that was sitting on the carpet. I immediately called my landlord, and to his credit, was very responsive in getting a water remediation team in there. However, despite multiple fixes, the flooding continued over the course of 8 weeks. It got so bad that I had to sleep on the sofa in the living room because it was either the moldy smell, the industrial fans, or exposed concrete that made it uninhabitable. I threatened to withhold rent unless the problem was solved. We worked out a compromise that he would install a sump pump, and reimburse me for a new mattress.
Definitely threaten withhold rent due to uninhabitibility, and depending on what your lease says, move out if the problem is not resolved within a timely manner. They’ll have to deal with this issue whether it’s with you or a new tenant, so that should light a fire under them. And don’t get into WHY it’s leaking – whether it’s the roof or an upstairs unit. It’s leaking, and they need to fix it, period. You’re paying for a safe place to live, and right now, you are unable to fully enjoy that space. In hindsight, I should’ve pressed for more damages, but I was a new college graduate at the time and wasn’t fully aware of my rights. Good luck!