I'm at the point where you fight Kyogre and can't catch him...ughhhh

I didn't realise the masterball was in the hideout so I never got one and now its raining so I can't get back into the hideout. I've gotten Kyogre down to a sneeze away from death and used 30 ultra balls and can't catch him. I've even tried using sleeping powder but it misses every time...Ughh any suggestions?????????

Thankyou in advance