My last cat, Motorola, did that, I would pick her up and carry her to her food dish and in a little while she was back by the wall. She just stared at the wall until she died. She had no known illness but she was old 14 or 15. I asked my vet (my brother) and he said her organs were shutting down.
My kitty is 14 yrs old, too. How long did she do that before she died?