Although the distance from Riga to Vilnius is, by European standards, a stones throw, the reality is that it is a fairly major undertaking. After much deliberation we decided that the overnight train was the best option and would allow us to catch some Zzz's.....or so we thought!
We departed Riga at 0022 and the guard assured us that he would waken us on time. Most of the other travellers appeared to be used to the journey and very quickly the train resembled a refugee camp.
The border crossing was fairly traumatic for many of the local travellers who turned out to be Ukranians - one or two did not have transit visas for Belarus and were ejected from the train by some very bureaucratic uniforms in the early hours of the morning in the middle of nowhere in the pitch dark. Even if you don't plan to stop in Belarus, make sure that you organize adequate visas.
At around 0430 we got organized to disembark, but had to forego a tirade of shouting from the guard. We assumed that we had disturbed his beauty sleep! He assured us that we were far too early.
We wakened a few hours later in a panic thinking that we had missed our stop - the next stop is Minsk in Belarus - but fortunately had forgotten to take in to account the time change. Estonia and Lithuania run on European time, but Latvia runs on Eastern European time!!
Best advice - take the bus!