Some Long Island Rail Road foremen earned thousands of dollars in overtime pay for hours they did not work by billing travel time as OT, the MTA inspector general revealed Wednesday in a damning report.

IG Carolyn Pokorny probed four high-paid foremen with the LIRR’s Buildings and Bridges Department and found they were able to fatten their pay checks by logging travel time to and from overtime shifts as hours worked.

Based on the three-month investigation, the “shrewd” foremen may have earned as much as $146,800 in total from “questionable” travel time earnings in 2018 — around 23 percent of the $650,836 in combined overtime they earned, she said.

“We conclude that this has been a very costly and wasteful practice, brought about by years of managerial neglect that allowed a small group of workers to take advantage at taxpayer expense,” said Pokorny.

The workers were able to log the extra hours in part due to a “handshake” agreement between the LIRR and its union that allowed employees to add an hour of earnings onto each end of an OT shift — although many were claiming more time than that, she said.

Pokorny also cited an “honor system” approach to timekeeping at worksites run by outside contractors.

The practice runs counter to the LIRR’s contract with the foremen’s union, United Transportation Union Local 29, which “expressly” forbids collecting overtime between shifts, Pokorny said.

The four foremen’s actions were far from uncommon. The IG’s review found similar “patterns” in the timesheets of 78 percent of the LIRR’s 127 Buildings and Bridges employees, suggesting that the practice of billing travel time as OT is “widespread.”

One of the four foremen probed was Raymond Murphy, who The Post previously reported raked in more than $280,000 in pay last year — more than half from overtime — and was then busted by the IG’s office hanging out at home while on the clock.

“These workers submitted time sheets to their supervisors showing their claimed overtime hours, including whatever amount of travel time they chose,” Pokorny wrote in a letter to LIRR president Phil Eng dated Sept. 26 and released Wednesday.

“Their supervisors then approved the time sheets without any assurance that the hours claimed were actually worked and without any specific knowledge of how much of the overtime was attributed to travel time,” she said.

Murphy made $405,021 in 2017, of which $295,490 came from overtime.

He retired in June 2018 with his pension intact before the agency could begin disciplinary action.

He previously insisted to The Post: “Any money I made was done by my working and doing things that was requested by my supervisors.”

In a statement Wednesday, LIRR President Phil Eng pointed to the system-wide installation of biometric time-clocks, which the report said Buildings and Bridges officials had been reluctant to implement. An outside firm has been contracted to address the travel time issue.

“We are determined to recover pay that was received without being earned by a small number of employees, and have already reclaimed funds in certain cases,” Eng said.

The LIRR is in the midst of what will likely be years of negotiations with its 10 unions. Agency officials hope new contracts will eliminate double pay and allow the LIRR to yank pensions from overtime abusers.

Union leaders did not return a request for comment.