I find it kind of amazing how often this type of question appears on this web site. It hasn't happened to me yet. It also seems to frequently involve parents or in-laws, who no longer have kids at home. I'm thinking they've all "forgotten" how difficult it can be on a family to rearrange their routines in order to accommodate unexpected overnight guests. Just an observation, for whatever it's worth.
That being said, I would have been pissed to have my day off taken hostage like that, and probably would not have been very gracious about it, so kudos to you for handling it better than I would have.
Does your FIL live near you? You did point out that your FIL is lonely. I agree with those who have said that maybe you could invite him over more often, etc. I'm dealing with that kind of stuff with my own mom now. Also if he lives near you, maybe you could research some clubs, etc that he might be interested in and then tell him about them. Or, I guess you could do that even if he doesn't live near you.
As far as unexpectedly wanting to stay the night, ask him when you invite him over if he'll be bringing an overnight bag, so you'll know ahead of time. Or tell him when you invite him that you can't wait to see him but just in case he was thinking about it, it wouldn't be a good time for him to stay the night.
One more thought just popped into my head; how old is he? Any chance he's worried about driving at night and just doesn't want to admit it?