[...] he went to bed at whatsoever hour he chose,
arose with such larks as were abroad at the moment, [...]
The parallel construction here is your clue into the joke. The gentleman in question goes to bed when he pleases and gets up when he pleases. The narrator compliments the gentleman for "arising with the larks" (a phrase that, you're right, normally means "arises early in the morning")... but his next words indicate that we don't mean the usual early-morning larks. We mean, you know, whatever larks might happen to be out at this hour.
A common joke with the same format is, "I start drinking only at 5 o'clock... and it's got to be 5 o'clock somewhere!" (However, in that case, the joke is that it's 5 o'clock somewhere else in the world, perhaps far away, which coincidentally is another meaning of the word "abroad." In the context of this quotation, the word "abroad" simply means "out and about, conducting their daily business.")
The narrator then goes on to say (and IMHO weaken the punchline of the joke by saying) that in addition to getting up with whatever larks are abroad at the moment, sometimes the gentleman stays in bed instead. So:
He gets up with the lark, but it's not always the morning lark. And, come to think of it, sometimes he doesn't get up at all.