Train at 5 miles is nothing. Can confirm.

There are confounding factors of course, like direction and what's in between. E.g. do you sleep in a room that's on the opposite side of the house with windows closed and good insulation/windows? You'll probably be totally fine.

Do you sleep in a room that's towards the source and with the window open? Oh you will very very much hear that train, especially if the wind is coming from that direction.

Sleeping outside? Oh you will very much hear that train!