I have had the same problem with my Macbook Air loosing connection with the Apple BT keyboard, ever since upgrading to Lion. Sometimes simply leaving the computer long enough for it to go to sleep results in loss of the connection. Sometimes it will return spontaneously, other times I must reconnect.
Today for the 1st time, I had to remove the keyboard from the BT list and re-add it. It took a while to get around to trying that and I was more than a little frustrated!
I NEVER had this problem under Snow Leopard.