It is, in my opinion, quite safe to travel by train in all parts of Europe. Depending on the country (and the route), you always have an option of locking your stuff to the shelves above your seat (or berth). I never had any trouble traveling by train in Europe.
The only thing that I encountered in my travels was not a problem for me but it might be for others and that is that there are often young drunk people getting on the train so if you want some peace and quiet, they would probably disturb you. If not, join them, they're almost always friendly and ready to accept travel/drinking buddies. (This is usually in cabins, not in sleeper class. Also, it almost exclusively occurs on weekends, Thursday to Sunday.)
Your assumption that train travel outside Western/Northern Europe is unsafe is completely wrong. Train travel in Balkan countries (I'm from Croatia and travel almost exclusively by train in my country) is very popular and a lot of people enjoy it. People you meet are almost always quite friendly and helpful and will look after your stuff in a cabin if you get to know them. Don't want to be prejudicial but if you want a fellow traveler to look after your things, aim for older females, solo travelers or people you made a connection with by exchanging stories.
Also, although no one will steal your stuff, you mustn't forget your things on board a train even if you're getting off at the last station since almost no one is taking those to the lost and found office (and some stations don't actually have any). That's how I lost my fishing poles a few years back. Besides, that same train you arrived with can be scheduled to leave in a short while so you won't be able to check the train yourself.
Hope this helped...