Hi,
From what you say, good decoupling from the dodgy sounding wall wart might be the answer.
Not sure if any point tying Q output to ground, as it's an output, not an input so should be completely irrelevant.
Don't know enough about relays to say if putting 24VAC and 5VDC on same side is not a good idea. If can spare the voltage, looks like it if only a 2N3906 there, the indicator LEDs + their respective ~470R resistors could be paralleled on the Q' output with the transistor, and in that way not mix AC and DC so close on a relay.
Things to try could be, if not already done so:
Bypass 4027 supply pins with 1 to 10uF, or 0.1 and 1uF in parallel could work well.
Maybe a 1K resistor between J and K to V+ and another 1K from Reset and Set to ground, and "place" V- along with V+ behind above-mentioned bypass capacitors.
Is the 5V wall wart trustworthy?
Rather than sit for hours watching if its ouput fluctuates much with a voltmeter, if it's one of those 5 - 12V types and you have any spare 5V regulators, put one between the DC adapter and your circuit. And either way, certainly do decouple/bypass the wall wart connections into the circuit with anything from 10 to 100uF; could try 0.1uF, 1uF, 10uF and 100uF in parallel - maybe overkill but it covers a range of high-ish to low frequencies and could be enough reservoir cap to stop fluctuations that cause false triggering.
By the by, or bye the bye, never remember, I saw a solenoid driven flow valve a few days ago, available as 1 inch or smaller diameters.
I'd start with simplest things like bypassing circuit input and the 4027 supply pins, the 1K resistors, and if that made no difference I'd consider exorcising the bathroom
- birds or something like rodents move around inside my roof sometimes at night - it's creepy when you're half-asleep, so I empathise.