Marathon to Ultra Running

I can run the ultra any time in the year - any advice whether to do the ultra, then the mararthon a couple of months later, or the other way around?