A three-dimensional numerical simulation in the nighttime midlatitude ionosphere is developed for the first time and applied to the Perkins instability in the midlatitude F region. Growth of the Perkins instability is successfully reproduced under nighttime condition, and the numerical results basically agree with a linear theory and previous two-dimensional numerical studies. Northwest-southeast (NW-SE) alignment of density perturbations is generated from random seeding by applying a southeastward neutral wind. The perturbations are dominant at altitudes of 200–300 km where a steep density gradient exists, which is consistent with the altitude of 630-nm airglow emission that often shows NW-SE alignment. Further simulation in terms of the E-F coupling can be done in the near future.