A Tennessee man accused of having sex with a corpse while working security at a hospital checked into a mental health facility.