It seems there is no overnight bus for Takayama City (in Gifu) available from KIX or Osaka City.
KIX is located in Osaka Prefecture but outside Osaka City.
Arriving to KIX so late at 22:30,
you still can get to Osaka City before the dawn by rail or bus,
but you probably cannot catch there an overnight for Nagoya City (in Aichi).
Limousine buses for Umeda area are departing from KIX terminals until around 2 am.
A one-way fare is 1550 yen.
http://www.kate.co.jp/en/timetable/detail/UMUnderstand there's a Nohi Bus fr Osaka Nanba OCAT to Takayama but run til 4pm only. This expressway bus line has a stop in Umeda area.
http://www.nouhibus.co.jp/english/kyoto_osaka.htmlIf you stay in Umeda area, you can
either catch a morning bus at Osaka Ekimae (Higashi Umeda) or,
get to JR-Namba Station by JR and catch a morning bus at Nanba (OCAT)
(unless the bus is unfortunately fully booked).
JR-Namba Station exists in OCAT.
Please make sure to choose a hotel which would accept your very late arrival.
According to the current timetables
{Weekday / Saturday, Sunday or holiday}
from Osaka Station to JR-Namba Station by JR (190 yen):
Osaka
{Dep. 06:41 / 06:46 (Track 1)}
| JR Osaka Loop Line's inner loop
{Arr. 07:00 / 07:02}
Imamiya
{Dep. 07:07 / 07:11}
| JR Yamatoji Line
{Arr. 07:10 / 07:13}
JR-Namba.