Yes, if its a E-Ticket Deferential Fare will Refunded to your Account Automatically. *If its a PRS Ticket TTE will Provide a Certificate on Board. By Producing this you will Get refund of differential Amount

REFUND IN CASE PASSENGERS ARE MADE TO TRAVEL IN A LOWER CLASS FOR WANT OF ACCOMMODATION :If a ticket holder of higher class is made to travel in a lower class for want of accommodation in the class for which the ticket was issued, refund of difference between the fare paid and fare payable shall be granted at the destination station or the originating station as the case may be. The refund at the destination shall be granted only on the production of a certificate from the conductor/.guard/TTE and the ticket is presented within 2days of the date of issue of the certificate (excluding date of issue) of the arrival of the train at your destination To claim this refund passenger...more...

will have to submit ticket along with the certificate issued by te Traveling Ticket Examinerindianrail.gov.in