Try to get the train schedule in advance, then see how it goes. It seemed like a 10-minute walk from the bus kiosk to the train station and I just missed a train, had to wait over an hour for the next train. Since I didn't know the bus schedule either and didn't fancy a long walk back with my luggage I just plopped down at the very basic cafe next to the ticket office and waited it out. Be careful to get the train to Centrale as many go to Cardona. You can only buy tickets at MXP using the machines, which take only credit cards, and mine didn't work.
In hindsight, I would have stopped at the bus kiosk to find out when the next one was leaving before shlepping to the train. And I may have made a better decision if I'd had the train schedule with me.