The metro stops running around midnight, which sounds like the end of the evening and is actually the beginning of a different one. Everything a visitor needs between one and five in the morning is open, staffed, and busy, and the city has arranged itself around the assumption that you might not go home.
The 24-hour café is the load-bearing institution here. Not a bar: a café, with fluorescent lighting and students doing coursework at three in the morning, where nobody will ask why you are there. The jjimjilbang does the same job with a floor to sleep on and costs less than a hostel bed. Between them you can hold a weekend open indefinitely.
What this does to a two-day trip is hard to overstate. You are not choosing between the night market and a night of sleep, because the night market runs late and the sleep is optional and cheap to defer. Most people leave Seoul convinced they were there longer than they were.
