The study showed that those falling asleep between 8 and 10 p.m., had the best sperm motility, meaning the sperm are better swimmers and have a greater chance of fertilising an egg.
On the other hand, men who went to bed after midnight had lower sperm counts and their sperm died much sooner too.
Sleeping for six hours or less made this even worse, as did lying in bed for more than nine hours.
Late bedtimes and inadequate rest are harmful because they increase levels of antisperm antibody -- a type of protein produced by the immune system which can destroy healthy sperm, led by researchers from Harbin Medical University in China, the Daily Mail reported on Saturday.
Previous study revealed that men getting six hours a night had sperm counts that were 25 per cent lower than in men snoozing a full eight hours.
For the study, published in the journal Medical Science Monitor, the team monitored sleeping patterns in 981 healthy men instructed to go to bed between 8 p.m. and 10 p.m., between 10 p.m. and midnight, or after midnight.
They were also told to set their alarms so they got six hours' sleep or less, seven to eight hours, or nine hours or longer.
Scientists took regular semen samples to check sperm count, shape and motility.