Accept Y and asjk for a refund as soon as you hear positively from X. But, it's always best to plan for the worst-case scenario.
1. Is it appropriate to let school X know about the masters program and their deadline and my situation?
2. If yes, is it better to contact school X via email or phone?
3. Could I push it even further to ask school X if they can tell me if my chance of getting off their wait list is favorable or not WITHOUT revealing my exactly position on wait list.