If a habitat is properly weighted on the base, and/or has most of it's mass underwater, the wave should just crash through it/ride through it.
May not be terribly comfortable, on par with an earthquake/car hitting your house and knocking shit around, but fairly survivable I would think.