I did a similar trip last month. The border officials in Brest only put an entry stamp on my Belarus visa. I don't recall them even looking at the Russian visa or asking where I was going after transiting Belarus. (Almost all trains stop in Minsk where you can change, even on a transit visa, so it's not a foregone conclusion that you are travelling onwards to Russia, even though I'm sure that's the norm; possibly you could be travelling on to Lithuania, back in the Schengen area.) In addition to stamping my passport, on entry to Belarus, I was given a stamped entry form that you need to keep until your departure from Russia. On leaving Russia, they took this paper, seemed to checked that there was an entry stamp on my Belarus visa, and put an exit stamp on my Russian visa.
Addendum: Are you travelling on train 010Щ «Polonez»? If so although you exit Poland before midnight, the border inspection on entry into Belarus is frequently after midnight, and if so your Russian visa will presumably already be valid.