A Pembrokeshire police officer has told a jury he left work early or arrived late 72 times in three months following family bereavements.
Swansea Crown Court heard Timothy Pawlett, 52, from Haverfordwest, allegedly claimed his full hours at Fishguard port, leading to an overpayment of £1,100.
A second officer, Gareth Clement, 55, from Crymych, who was overpaid £710, told the court he was "exhausted".
Both have pleaded not guilty to fraud.
The prosecution read out Mr Pawlett's police interview in which he said his "mental health started to deteriorate" following family bereavements.
The court was told he enrolled on a psychology degree course to help focus his mind.
Mr Pawlett said a request to change his shift pattern was declined and he was "exhausted from a lack of sleep and a change in medication".
He said he would sometimes leave the port to keep his dignity as he was close to breaking down.
The court heard many of his time sheets had been entered retrospectively.
Mr Clement, who the court heard left work early on 54 occasions, said his exhaustion was down to issues in his private life.
The trial continues.