The New Zealand filmmaker went to hospital on Wednesday night and had surgery for a perforated ulcer, The Hobbit publicist Melissa Booth said.
He is currently resting comfortably and his doctors expect him to make a full recovery.
Ms Booth said Sir Peter's surgery is not expected to impact on his directing commitment to The Hobbit, though there will be a slight delay to the start of filming.