What is the purpose of the search in the header? It's usually locate some content on your website and the purpose of the sitemap is primarily for SEO (a single page allowing robots to quickly navigate to all pages and index them). I would argue that a human user would rarely go to the sitemap page if you have a search field in the header on each page.
Assumption: you wont have two search boxes, one in the header and one on the sitemap page itself.
If the purpose of your search field is to search other website entities in addition to pages. Only display the search field in the header and don't show it "in-page" on the Sitemap page. You don't need that duplication.
If the pure purpose of your search field is to find pages which are all listed on the sitemap, you can apply the same design pattern used on a mac:
Highlight matching items in sitemap or fade out items that don't match your search query. But again, I think it would be a "cool" feature, but for very small segment of your traffic.