Look through the windows, if someone is awake, request them to open the door. Alternatively, approach a train attendant or TTE, on the platform for help. Getting onto an open compartment/bogie will not help much, as the interconnecting doors are normally closed after 11 PM.