Sailors and other crew on commercial ships docking at U.S. ports (typically on a D visa) sometimes use this as an opportunity to escape a repressive home country. Can they file a claim for asylum in the United States? It's sometimes a possibility for a crewmember to apply for asylum, but the key will be their manner of entry into the United States, as discussed below.
U.S. asylum offices are not authorized to interview people who entered the United States as crewmembers, specifically if they arrived at the United States aboard a vessel and:
A crewmember who enters the United States in any other way can apply for asylum with the asylum office. That includes someone who enters the United States without formal inspection by U.S. immigration authorities. So, for example, a crewperson who secretly left the ship and managed to enter the United States should be able to apply for asylum with the asylum office. Since the officer will probably want to see the person's passport and crewmember book in this situation, it is important to detail your entry, so as to demonstrate that you entered without inspection.
Crewmembers are one of a small group of people who are entitled to special, limited immigration court hearings before an immigration judge. For a list of those groups, look at 8 C.F.R. § 208.2(c)(1).
The issue here is that you wouldn't be able to have your asylum application heard first by the U.S. Asylum Office, in a non-adversarial proceeding. Instead, upon submitting an application or presenting yourself to U.S. immigration authorities, or requesting asylum from immigration authorities who visit your boat (assuming you can convince them you have a credible fear of persecution or torture in your home country), deportation (removal) proceedings will immediately be started against you. Your case will need to be presented before an immigration judge, and an attorney for the U.S. government will (in all likelihood) argue that you should be deported. Also, there's a good chance you will be kept in immigration detention in the meantime.
If you arrived in the United States as a crewmember, it would be an excellent idea to consult an experienced immigration attorney for a full analysis of your legal situation as soon as possible. The attorney can assist in preparing your application and can appear with you before the immigration judge.