Can you still eat apples when they've been wet by seawater for a long time?

Provided the apple looks and smells fresh and crisp (as though you would like to eat it) it should be OK to eat. Seawater itself will not harm the apple.

Seawater is not a sterile environment. The apples might be OK or might not. There is no way to you to tell. If you are considering eating apples that have been involved in a flood, I would not recommend eating them.