1. You enjoy and learn well from traditional classroom-based education (true for some people, not for others);
2. You narrow down to something more focused that you'd want to learn if you had two years to devote to it (more specific than "computer science"); and
3. You can afford it without it causing financial difficulties.
Beyond that, there are of course lots of specific circumstances. If you want to move to another country, doing a masters degree there can be a way to ease into the local job market. It's a particularly common route in places where you can do the masters in English, as in Scandinavia and Singapore.
Alternately, some companies will reimburse you for part-time nights/weekends masters study. That's not the same as studying something full-time for two years, but can be a compromise of sorts. The arrangements vary a lot by company. Some will pay for one course a semester. Some will do it on a case-by-case basis if your manager thinks it's a good idea. Adobe will pay for up to $10k/yr of tuition/books/etc. if your manager agrees it's related to your job (http://www.adobe.com/aboutadobe/careeropp/additional_benefit...). IBM has a less generous but unrestricted program where they'll kick in 1/3, up to $1000/yr, of any courses you chose to take on your own (http://www.ibm.com/ibm/responsibility/learning_accounts.shtm...). Yahoo will give you $5250/yr (http://us.careers.yahoo.com/benefits/tag/118/).