400mg is not too much ibuprofen. that is the typical amount.
I take twice that pretty often. 800mg. is the prescription level dose.
yes ibuprofen can cause stomach upset, but, IMO, at the dose you took, it isn't likely the cause. I mean my 13yr old took that amount last night.