A composition comprising a combination of sodium beta-hydroxybutyrate, magnesium beta-hydroxybutyrate, potassium beta-hydroxybutyrate, calcium beta-hydroxybutyrate, and at least one ketone ester for oral administration to humans and other animals, as well as a method for administering said composition for enhanced physical or cognitive capabilities, physical endurance, or post-exercise recovery are described. The composition provides electrolytes to replace electrolytes lost during intense or extended physical activity to reduce the likelihood of cramps, muscle spasms, or fatigue from depletion of electrolytes. The composition concurrently provides ketone bodies, which raise the level of ketone bodies in the bloodstream and induce ketosis (>;0.5 mM of ketone bodies in the bloodstream) and provide an alternative energy source to glycogen during physical activity. The composition generally does not cause side effects or discomfort in the user. The composition may optionally comprise at least one medium-chain triglyceride (MCT).