I stayed at the retiring room of Jasidih railway station. Retiring rooms are also available at Deoghar and Baidhyanath Dham rail station but honestly, those are smaller cramped accomodations and the latter's retiring room was closed when I visited it. Jasidih, being the biggest station, might be your best bet.