D.,
I'm not a psychologist, only a long time observer of human nature.
There are any number of reasons for his actions. Most often, I think it is a form of testing his power/control.
Daddy responds in a set way every time. Wow! Look what I can do to Daddy. Your son is a baby. He doesn't intend to be mean. He is still in the learning mode and thinking of 'me first'.
So Daddy needs to change his response. The next time your son tells his daddy he hates him at bedtime Daddy should say, "I am sorry you feel that way, Son, because I still love you, I always will and will always be here for you. But if you don't want me to help Mommy put you to bed, I'll go read my book (or watch TV, whatever). Have sweet dreams. I love you."
When Daddy comes home from work he should cheerfully let his son know he is home. Ask him if he had a good day and then go about his daddy business.
So, you get the idea. Let Son come to Daddy. He really wants Daddy's attention and suddenly the 'hate you' thing is not working, so he will try another approach. At this point Daddy is in control, because he will ignore inappropriate advances until your son is interacting in a loving way.
In a nutshell---we can not change other peoples behavior except by changing ours. All human relationships are based on action and reaction. Most especially in children. This is the way they learn. They act and closely watch your reaction. You have to turn it around so that you ACT and they have to REACT.
And of course the timeless advice of being consistant is very important here.
I never had a child do this but I have seen this approach work with 2 of my nephews.
Good luck and God bless.
D.