Usually I also tend to play towards the outer edges of the keys, one of the reasons being so that I get slightly more control over the keys, as you get better leverage at the edge. You might ask, well, what do you do to play black keys? The answer is to open your finger, not totally staight, but straigter than it would be on a white key. Of course you'll have to play near the headboard sometimes, but here are two reasons why I tend to play towards the outside edges of the keys.
1. So that I don't have to move my hand in and out so I can switch between black and white keys.
2. So that when I drop my fingers on the keys, finger-to-white-key distance is the same as finger-to-black-key distance.
About #2 there, I'm not sure how many people know that technique, and it's one that I learned fairly recently, where you drop your fingers on the keys with the weight of the arm behind them as opposed to just pressing the keys down with the fingers.
If anyone doesn't understand #2, I'll attempt at putting a clearer explanation here. Imagine putting your hand on a regular set of white keys, one next to the others, (such as D-E-F-G-A). Your fingers are curved as if they are holding a ball. Now, say you want to play that F# with your 3rd finger (which was on F before). You could keep your finger curved the same way, but just move your whole hand in towards the headboard so that you can play the F#. But, you could also keep your hand in the same spot, but just extend your third finger out to the F# by straightening it a bit. I won't get into the details on why opening the finger to play the black keys is better than keeping them curved, but there's the basic idea. Less movement = more efficient playing.
Hope all of that makes sense! If anyone's got a better explanation (i'm sure there's some other ones out there) then post it here!