The 30-year-old said that she had not been feeling well on the day and took a moment to close her eyes in a children's compartment, letting her managers know and asking them to wake her if needed.
But she woke up seven hours later in Basel, Switzerland, to find the passengers dismounting.
She worked for the remaining four hours of her day but received a letter from DB seven weeks later informing her she'd been fired.
The company had complained that the chef hadn't submitted a retroactive sick note to excuse her missing work.
But on Wednesday the labour court found that DB was wrong to fire her.
And they said that it was irrelevant that she had already been warned over sleeping in on two previous occasions, as this was a different breach of the rules.
The judge asked why the “totally normal way of colleagues looking out for each other” hadn't happened in this case and no-one went to check in and wake her up.
“I'm happy to be able to go back to work," she said, adding that she wouldn't be sleeping during work hours in future.
"I've learned my lesson."
DB now has a month to appeal in the case.