I'm not sure what you can take, but I've found (if I catch it early) that Advil liqui gels are the best thing. Once you're past a certain point only the dark room/quiet will help, but here's the website:
Advil.com - Wyeth Consumer Healthcare
I do see this warning though....
If pregnant or breast-feeding, ask a health professional before use. It is especially important not to use ibuprofen during the last 3 months of pregnancy unless definitely directed to do so by a doctor because it may cause problems in the unborn child or complications during delivery.