I would say when they stop wanting it. It's quite normal though for kids to have a glass of milk before bed at 2, 3, even as old as 5. Generally speaking, toddlers should have about 500 ml of milk or the equivalent in dairy based foods (cheese, yogurt, etc.) every day, so having a cup of milk before bed is one way to get some of this dairy into them if they aren't getting it all from other sources. My daughter is 17 months and has a cup of about 200 ml of milk before bed (it's the only milk she has all day other than in foods, like porridge or cereal, or yogurt/cheese, etc.), so I'm quite keen to keep it up until she doesn't want it anymore.