Anybody thinking about diving on a layover less than at least 36 hours is, in my opinion, nuts. 24 hours really is a minimum offgas time for dives to any significant depth. With less you may be fine flying with a normal cabin altitude, but if you experience a decompression you're much more likely to get bent, and maybe to the point that you are instantly incapacitated.
In my younger and dumber days, I did very shallow dives(less than 30ft) and then flew 12-16 hours later...and I was lucky I never had a problem. When I joined DAN all those years ago and started reading the medical information I realized how stupid I had been and stopped doing it.
Many years later, I was bent after a very conservative dive plan(on my off time, not a layover). It was a decompression dive, but we exceeded our mandatory decompression by over 50%(about 35 minutes of decompression required on our nitrox mix, we did 60, 15 of it on pure O2). About 2 hours after the dive I started to have joint pain in my knees. Off to the local hyperbaric chamber I went for a Table 6 recompression event. They said I was mildly dehydrated, but couldn't find any reason my dive profile should have caused this. They said it fell under the sh*t happens category.
Don't risk that sh*t happens category by flying too soon after diving.