Get a Window Seat
When I reserve a seat on train (or a plane, for that matter), knowing that I would like to sleep during the journey, I often book a window seat. That way I can lean my head on the window, rather than having it hanging in the void, causing me to wake up every ten minutes as soon as the neck ache kicks in. Moreover I place a jumper/t-shirt/soft-layer between my head and the window. This layer acts as a pillow and temperature insulator.
As the comments below suggest, the windows seat is also strategically placed so that you will not be woken up when your neighbour needs to go to the bathroom. However, you can always climb on top of the seat, or find another acrobatic way out, in case you are the one who needs to go to the bathroom. From my point of view it is better to be the one climbing over rather than to be climbed over.
Pack for Sleeping
If you want to sleep, bring sleeping gear. Since you are travelling by train, you don't have to abide by weight rules for your carry-on. So you can pack as much gear as you like. For me, necessary can't-sleep-without-it gear includes:
- Sleeping mask
- Ear plugs
- Travel pillow
- Some form of cover: blanket, jacket, sleeping bag
Anticipate Pickpockets
As others have mentioned in the comments: sleeping on a long-haul night train makes you a target for pickpockets/thieves, especially if you don't have the extra safety of being inside a private/locked compartment. To be fair there is not much you can do to make yourself, and your stuff, completely 100% thieve-proof. More so if you are sleeping in an unlocked, unsupervised space. What you can do however is make sound assumptions on thieve behaviour and plan ahead. Your objective should be to make your stuff less appealing for thieves because it requires more effort on their part to take it.
Here and here are some general pickpocket-prenvention tips. Here is some advice on sleeping in couchettes on Italian trains. Below is a summary of what I think are the most relevant points for the purpose of sleeping in a train:
Keep your money/documents/phone/valuables on you, either in your pockets or in dedicated supports (for example money belts). Clothes and other less-valuable items can go in your rucksack/suitcase.
If you have a small backpack/laptop bag, strap/clip/tie it to some fixed support. This can be either your leg, the seat itself, the table between seats, etc. The point is that anchoring the bag to a fixed support makes it harder to be snatched away.
Similarly, you can also strap/clip/tie your rucksack/suitcase to, for example, the luggage rack. Once again this makes it harder to snatch.
Lock the zippers on all your bags with padlocks/zip-ties/key-ring/paper-clips. This will obviously make the bag harder to get into.
Make sure that the topmost item in your backpack/rucksack/suitcase is something that a thief would have no interest in taking. My personal favourite are dirty underwear and socks, kept in a plastic bag with its opening towards the opening of the backpack. This way its content is the fist thing a potential thief would see, when accessing the bag. I always laugh when picturing what their face would look like.
Final Remarks
Having said this, note that I somewhat agree with this guy:
If you’re determined to avoid paying for a couchette, [and fail to find anything else but a standard (non-foldout) seat] book a couchette — what you’ll spend is less than what you’d waste by arriving at your next destination too fatigued to enjoy it.
This is especially true in case of long-haul train journeys such as the one you mention. Moreover, couchette compartments can be locked from the inside adding an extra level of safety for you and your belongings.