I found a desert village villager with no job wandering in house with no bed, and I put a barrel in the house and the villager turned into a fisherman. I then put a new bed in the house, and the villager just wouldn't sleep and occasionally sinks into the bed and up again.
I was unable to reproduce this issue. Can you provide a screenshot with your debug screen enabled (F3)