The blast of the train whistle under temperature inversion conditions can to bend upward, traveling quickly through the warm air high above the ground before spreading downward through the cool air closer to the ground and into your ear through an open bedroom window.