Join associations and/or produce content that will naturally attract links from these top level domains.
If you have a site in a unique niche related to .gov for instance, you might have a better shot at it. For example, I have a personal website in the aviation industry and I have two .gov's and thre .edu backlinks. I acquired the links via traditional link exchange. The only reason I was able to get the links is because my site is a benefit to the sites that I obtained the links from.
Keep in mind that it won't work for all types of sites. If your site is selling gift baskets or another typical retail product that we see every day on the web, the chance of landing one of these links is remote. Your site has to naturally be related to an industry or market segment that naturally gets links from the top levels you seek.
Make sure your content is something that is of value to the .edu/gov/org sites. If it's a commercial site, get creative with the way you deal with content (ie- you site sells widgets, and you want to attract a .gov, create a page, with articles and specific products about "What .gov's need to consider when buying widgets") Then make sure you are sending a link request to the person who actually maintains the page you want a link from
I think your question really is about .edu & .gov. Maybe when you said '.org' you were using it as shorthand for all large, well-known non-profit sites. If so, then fair enough, because they are probably as hard to get links from as .gov. However the domain extension .org itself is not in the same league as .edu or .gov.