There is no problem for cats sleeping facing a wall. Cats like to sleep against the wall because they can feel changes in their surrounding environment and respond at any time. Cats stay alert while sleeping to protect themselves at all times. Therefore, sleeping against a wall can make your cat feel safer.
In addition, cats may sleep facing the wall to avoid interference from other animals or people. In nature, cats will look for a safe place to sleep. Sleeping against a wall can make it feel that there is a "wall" behind it, so that it can avoid interference from other animals or people. Generally speaking, it is okay for cats to sleep facing the wall, and it is a natural instinct of cats. If your cat likes to sleep against a wall, let it sleep naturally!