Some of the hundreds of sudden, unexplained baby deaths each year may be linked to bacterial infection, research suggests.