In general it's much easier to book tickets on the website of the country you're departing
from. Unfortunately, I don't think the MAV site offers online booking.
An agent could probably book them for you, but it would be much cheaper to buy in person if your schedule allows.
Have you had a look at the Seat 61 website? A great resource.
http://www.seat61.com/Europe-train-tickets.htm