The Populist-Progressive Era seems like the most likely time--especially if Bryan is elected president. However, as I noted in a post a few months ago:
***
BTW, to give an example of the kind of thing that could stand in the way of federal ownership of the railroads during the Populist and Progressive eras: When Bryan came our for government ownership in 1906, the idea got a chilly reception not only from the press (as might be expected) but also (though more quietly) from some leading southern Democrats who feared that it might endanger railroad segregation in the South.
Bryan was bitter about this, telling some southern lawmakers "You...are opposed to government ownership because you are afraid your Jim Crow laws against the negroes will be abolished by the general government. As if your personal objections to riding with negroes should interfere with a great national reform." Michael Kazin, *A Godly Hero: The Life of William Jennings Bryan*, p. 147.
https://books.google.com/books?id=GUzEO18oGYUC&pg=PA147 But he bowed to political realities, assuring Democrats that he had spoken for himself alone on government ownership and that he would not insist on its being included in the 1908 platform (though he did urge that the idea at least be kept in mind if regulation proved insufficient).
From all this I think it clear that if elected in 1896 or 1900 or 1908, Bryan would favor stricter regulation of the railroads, but not government ownership. At most he might hint at the latter as a last resort; as he was to note in 1906, even those who disagreed with him on government ownership should keep in mind that the *threat* of it would exercise a restraining influence on the "railroad magnates." (Kazin, p. 146)
https://www.alternatehistory.com/fo...t-in-united-states-rail.406918/#post-13942284
**
The alternative, as noted, is after 1917. Now in OTL there was no serious possibility that the nationalization of the railroads would continue in peacetime because the "return to normalcy" Republicans were totally opposed to it. But what if Hughes or another Republican is elected in 1916 and proves to be very unpopular because of disillusionment with the war and *any* plausible peace treaty, with the postwar economy, etc.? See
https://www.alternatehistory.com/forum/threads/not-nostrums-but-neutrality-harding-in-1916.419819/ for why I think any Republican elected in 1916 will be vulnerable in 1920. In that case, you might get a quite radical Democratic president--maybe even Bryan![1]--elected in 1920 on a platform including government ownership of the railroads.
[1] Some might say that with victory in sight, the Democrats would never take a chance on Bryan for a fourth time in 1920. But that ignores that Hughes (or whoever else the Republicans elect as president in 1916) might seek to blame the US involvement in the war on Wilson, to try to deflect from his own unpopularity (and that of the war) by 1920. Bryan--unlike a "Wilsonian" candidate such as Wilson himself or McAdoo-- would be in a good position to profit from both anti-Wilson *and* anti-GOP sentiment, by pointing out he had resigned from Wilson's cabinet to protest the drift toward war. This could even win him some Irish- and German-American voters unhappy about his views on Prohibition (which in any event was not nearly as unpopular in 1920 as it was to become).