I don't think you did anything wrong in saying you could stay over if he liked. I know it's easy for us all to be like this, but he didn't tell you he din't feel upto a guest at the time- he could've just said so rather than make it seem like you did something wrong.
I have a lover who's a therapist
(he wasn't mine lol) and he tries to make me be honest with what I want and don't want, rather than go along with stuff just to please him.
You could say something like, 'sorry you felt that way- please just be honest and tell me if you don't want to do something in future. It's fine with me if you don't want to do something, I don't want you to do anything you don't want to do.'
I would be hurt if a bloke implied I'd done something wrong as I set a lot of store by trying my best in friendships/relationships. But everyone has your quirks and you weren't to know he'd be that way. Most people would be quite happy to say 'I'd love to but I'm absolutely knackered, I just need to veg out. Could we do it some other time?'
If he gets stroppy and blunt this easily, I would take it as a bad sign, it would not be something I'd want in a person.
He could even have said/texted the nxt day something like 'it was lovely to see you last night but please could you give me some warning if you're going to stay over?' He could say something then like it gives him chance to tidy up, or whatever.
If someone's saying 'No this, no that' I would feel that was stroppy. Not that he was giving his opinion/feelings, but the way in which he was putting it, with no attempt at politeness and consideration for your feelings.