If the bed is not warm enough, the cat will suddenly stop sleeping in the bed. They prefer to stay in a warm place, such as under the sun. So what the owner needs to do is to provide a warm bed for the cat.
Cats need a sense of security. If the owner suddenly makes them feel unsafe, such as punishing them, they will suddenly stop sleeping in bed, so the owner should not be too fierce to the cat.
The cat suddenly doesn't come to bed to sleep. It may also be that the owner has some smell on his bed or on his body that the cat doesn't like so much, which causes the cat not to approach easily, such as the pungent perfume.