Cats are clean creatures that dislike soiling their living quarters. You can litter train a stray but it does take patience. Keep the cat in a small room with a tray in one corner, food and water in another, and a bed in a different corner. Given a choice between soiling their bed or food, the cat will most likely chose the tray.