Not sure why there is confusion. The legislation permits landside and airside connections and doesn’t stipulate that overnight connections aren’t permitted. In this case, the landside connection would’ve been T5 arrivals to T5 departures, unless they were permitted to stay airside.
The only thing that could be debated is whether kingcole974 should’ve been allowed to stay in a hotel or whether they should’ve gone straight to Gatwick and spent the night in Costa coffee. But that just shows how daft the rules are.